How To Separate Categories With Blogroll In WordPress

Posted by

Hi,

WordPress blogroll has gone through many changes over the past year and a lot of the WordPress themes authors out there did not update their themes with the new code used to call the blogroll.

The old code still works but it does not give you the advantage of the new blogroll capabilities. If you have set up your blogroll with different categories but noticed that all of them display under a single category. It is probably because blog theme is using the original code that did not allow for much configuration. Blogroll code should be:

<?php get_links()’ ?>

OR

<?php get_links_list()’ ?>

If you want a more configurable code, you will want to use something like the following

<?php wp_list_bookmarks(‘categorize=1&before=<li>&title_before=<h2>&title_after=</h2>&category_before=</n>&category_before=</n>&after=</li>&orderby=url’); ?>

This code will display blogroll but you have to separate lists for different blogroll categories. This code display the category title as a Header 2 and use bullet points to display the content.

Thanks,

Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.