Adding Links for Navigation to the WordPress Pages List
The category titled “Pages” on the right-hand side of this blog is an area where WordPress will allow a user to create wiki pages. However, I wanted to include some navigational links in that area as well, which isn’t immediately available through the WordPress admin screens.
The solution I found was to create a new blogroll category and use it for navigational links. First off, I modified the call to wp_list_pages by adding the argument “title_li=0”, which tells WordPress not to wrap it in <ul> tags, but to instead only output the <li> tags. Then I wrapped the call with my own <ul> tags. Finally, I called wp_list_bookmarks in order to display the category I had created, which had an id of 34. I again used the “title_li=0” parameter and also had to add “categorize=0”, so that this parameter would not be ignored:
<li id="pages">
<h2><?php _e('Pages'); ?></h2>
<ul>
<?php wp_list_bookmarks('categorize=0&title_li=0&category=34'); ?>
<?php wp_list_pages('title_li=0'); ?>
</ul>
</li>
Leave A Comment