Quick Tip : Replace The Horizontal Page Menu With The Categories in WordPress Navigation Bar
30th May 2010 | Posted by Eko S. | 15 CommentsIn some wordpress theme, usually the category navigation menu often we get on the sidebar, but I think the position of the category navigation menu on the header section will be more beneficial, because it helps the reader to further explore our site content.
This of course also be beneficial for our site owners, because readers will be more comfortable for long, and this will make pageviews / impressions page of our site will increase.
Then these statistics we can offer to advertisers in order to put an ad on our site. Interested
But we will not display all the categories, because it will make a very tidy. In this article, also described a simple way to exclude categories from the navigation menu.
If you want to exclude the pages from the navigation menu, please see our previous article.
How To?
Step 1. Change the header.php file
- Open file header.php from your theme folder. Look for
<?php wp_list_pages('title_li=&depth=1'); ?> - and replace with.
<?php wp_list_category('title_li=&depth=1'); ?> - Save it! This step will replace your pages with categories on menu navigation bar
Step 2. Exclude the categories
Do not show all the categories in the navigation menu, only display categories that you think would be useful to readers. Here are the steps :
- Again look for
<?php wp_list_category('title_li=&depth=1'); ?> - Then change with
<?php wp_list_category('title_li=&depth=1&exclude='); ?> - Save it!
- Next, find the category IDs. You can choose one of the following ways :
Manually
Go to Posts > Categories in your WordPress admin panel. Hover one of your categories. As you can see in this picture below our ID is 3 (for example).
Use the plugin
Or the other method, you can use this plugin. You’ll see ID of the categories automatically. - Enter your category ID in this code, like this
<?php wp_list_category('title_li=&depth=1&exclude=3'); ?> - For exclude more than one category, use comma between the category IDs.
<?php wp_list_category('title_li=&depth=1&exclude=3,10,12,146'); ?> - Save it! It’s done
I hope this tip useful! If you have any questions, concerns, suggestions, or comments, please do not hesitate to let me know.
10 Comments to “Quick Tip : Replace The Horizontal Page Menu With The Categories in WordPress Navigation Bar”
Add Comments (+)-
-
Nice fill someone in on and this mail helped me alot in my college assignement. Gratefulness you on your information.
-
Wah bagus bener infonya. Akan kucoba. Thank fo sharing
Salam -
Hey Eko nice tut their for non coders,and something that people usually do not consider to write bout these days ,as most of us use highly configurable themes or are coders.
-
Thanks a lot.You saved lot of my time.But step 1 doesn’t work in my theme.After replacing category with categories it’s working….
-
Category didn’t work for me either, but using the plural “categories” did.
-
hey thanx a lot buddy ,can u also tell me how to add pages on the top ,now that i have replaced categories (category dint work for me ,thanx to gautham.b) but now i want the pages to appear above fold ,any tip ?
Trackbacks/Pingbacks
- Appletell reviews CoPilot Live HD for iPad 3G | The Apple Ipad Blog
- Quick Tip : Replace The Horizontal Page Menu With The Categories …
- Apple-Overload! » Appletell reviews CoPilot Live HD for iPad 3G | The Apple Ipad Blog
- Tweets that mention Quick Tip : Replace The Horizontal Page Menu With The Categories in WordPress Navigation Bar | DynamicWP -- Topsy.com
- Top Ten Key Usability Issues in Web Design | RoAce's 123 Power System Blog & Marketing Tips!





































Hey Eko nice tut their for non coders,and something that people usually do not consider to write bout these days ,as most of us use highly configurable themes or are coders.