One annoying nuance to many WordPress theme developers is how the bookmarks list is formatted by default in WordPress. While all the other lists – categories, pages, and archives – display in a nice, neat, one-level un-ordered list, it seems that the bookmarks tag does it differently. By using an extra parameter within the tag, we can easily fix this problem.
First off, here is the tag that displays a list of bookmarks [Codex Article]:
<?php wp_list_bookmarks(); ?>
Now, let’s try adding the
title_li= parameter like we do to all the other tags. Works, right? Not in the way we want it to.
See, technically, it is hiding something – the “Bookmarks” title that would normally appear above the list. On a default set of bookmarks, you’re probably still seeing “Blogroll”, followed by a second-level list of bookmarks in that category. So really, you’re seeing the title of the category these bookmarks are in. You follow?
To un-categorize the bookmarks and just display them as a straight list, add the ‘categorize’ parameter to the tag:
<?php wp_list_bookmarks('categorize=0&title_li='); ?>
By setting the categorize param to 0, or false, you’ll end up with a straight, top-level list of your bookmarks. Ta-da!