This is courtesy of mscott
How to Add pages to your main (Black) menu.
In the header.php add:
<?php wp_list_pages(‘title_li=’); ?>
So you change this:
<ul id="nav" class="clearfix">
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive() && !(is_category())) or (is_single()) or (is_paged()) or (is_search())) { ?>current-cat<?php } else { ?>cat-item<?php } ?>"><a href="<?php echo get_settings('home'); ?>"><?php _e( 'Home', 'wpbx' ) ?></a></li>
<!– change "depth=3" to suit your menu depth level, and change "exclude=x" with the category ID that you want exclude from the menu (multiple categories separated by , (comma) –>
<?php wp_list_categories('orderby=ID&order=ASC&depth=3&title_li=&exclude='); ?>
<li id="m-subscribe"><a href="http://feeds.feedburner.com/YOURFEEDBURNERUSERNAME"><img src="http://feeds.feedburner.com/~fc/YOURFEEDBURNERUSERNAME?bg=e33258&amp;fg=ffffff&amp;anim=0" height="26" width="88" style="border:0" alt="" /></a></li>
</ul>
To this:
<ul id="nav" class="clearfix">
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive() && !(is_category())) or (is_single()) or (is_paged()) or (is_search())) { ?>current-cat<?php } else { ?>cat-item<?php } ?>"><a href="<?php echo get_settings('home'); ?>"><?php _e( 'Home', 'wpbx' ) ?></a></li>
<!– change "depth=3" to suit your menu depth level, and change "exclude=x" with the category ID that you want exclude from the menu (multiple categories separated by , (comma) –>
<?php wp_list_categories('orderby=ID&order=ASC&depth=3&title_li=&exclude='); ?>
<strong> <?php wp_list_pages('title_li='); ?></strong>
<li id="m-subscribe"><a href="http://feeds.feedburner.com/YOURFEEDBURNERUSERNAME"><img src="http://feeds.feedburner.com/~fc/YOURFEEDBURNERUSERNAME?bg=e33258&amp;fg=ffffff&amp;anim=0" height="26" width="88" style="border:0" alt="" /></a></li>
</ul>
Remember when you add this code pages AND categories will be visible on the menu.
If you only want to show a couple of pages add this string:
<?php wp_list_pages(‘title_li=&exclude=1,2,3′); ?>
Where 1,2,3 are the page numbers you want to exclude.






































7 Comments
Hi. I have one question. Im trying to figure out how can i add in sidebar the featured category. So. If you are reading an articole from Themes ( ill take your site as example ) then under archives link in sidebar i want to see last 5 articles from same category not Themes Support but Themes and so on ) So for each article form a specified category in the sidebar i want that my guests to see the last 4-5 articles from the category where the article is write in. Hope you undersnad. best regards and thank you in advance
Hi Cip,
If I understand what your saying correctly you want to have a featured category in your sidebar. You can achieve this by adding a category called featured_sidebar or something like that under the posts tab in your dashboard. Then within your sidebar template place the cat number and how many posts you want to show.
Quite. So. standard we have a featured category who is displayed in sidebar, it dosent matter wich category article are you reading in sidebar its always featured category ( yours its theme support ) . Lets supose that featured category its Y
All i want its that a guest is reading an aricle form category X i dont want to be desplayed in sidebar the Y ( fatured category ) i want to be desplayed the X category. and so on if reading from Z in sidebar to be Z categpry not Y . thank you in advance
hi,
I want to add a forum button to my nav bar. the forum is based on a subdomein. is this possible?
Marco,
I did as you say above, and I get this error:
Parse error: syntax error, unexpected ‘=’ in /home6/modelhor/public_html/petfoodmenu/wp-content/themes/theme/thestars/header.php on line 74
What could be causing this error?
Hi there,
Firstly, thanks for a great resourse! Very helpful.
One question I have for the menu in the Stars Theme, is how to re-order the menu to an order I would like it to be, instead of being in the order when they were created?
Thanks
Hello,
I have an other problem with the main menu.
When i browse to the frontpage (home) in the title there is showing the name of a category.
At the moment “US TV” instead of Home.
Why is that happen and hou can i fix this?
Can you help me?
Thank you very much.
Sebi