Jump to content
xisto Community

Need Help With Wordpress

Recommended Posts

you can see my website here at

and as you can see the top navigation bar only displays categories that are being used in my blog posts.. now I want to change it so that the top-navigation bar displays pages instead..but I don't know what to change inside the header.php file..

the code to header.php is here
<div id="header">	<div id="blog-logo" class="clearfix">		<h1 id="blog-title"><a href="<?php bloginfo('url'); ?>"><? bloginfo('name'); ?></a></h1>		<h2 id="blog-description"><? bloginfo('description'); ?></h2>	</div>	<ul id="menu" class="sf-menu clearfix">		<li class="cat_item<?php if(is_home()) echo ' pagenav'; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li>		<?php wp_list_categories('title_li=&sort_column=menu_order'); ?>	</ul>		<div id="rss">		<a href="<?php bloginfo('rss2_url'); ?>">Subscribe to RSS Feed</a>	</div>

I'd appreciate it very much if someone could explain to me what is needed to change in order for the top-nav bar to display pages instead of active categories.
thanks in advance

Share this post

Link to post
Share on other sites

Replace the line

<?php wp_list_categories('title_li=&sort_column=menu_order'); ?>

<?php wp_list_pages('title_li=&sort_column=menu_order'); ?>

If you don't like the default options, then check out this page where you can see all the configuration options.

Share this post

Link to post
Share on other sites

<?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
In my opinion this might screw up the menu if there are too many posts. Try to limit the amount posted on the menu:

<?php wp_list_pages('title_li=&sort_column=menu_order&number="10"'); ?>

This will limit the number of menu items shown to only 10.

Other elements that can be tweaked as rvalkass said can be found at this page.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.