Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Need Help With Wordpress


2 replies to this topic

#1 user681

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 168 posts
  • Gender:Male
  • myCENT:47.97

Posted 15 November 2009 - 10:00 PM

you can see my website here at
 www.edgeset.elementfx.com
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

#2 rvalkass

    apt-get moo

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,107 posts
  • Gender:Male
  • Location:Devon, England
  • Interests:At the moment, Physics mainly!
  • myCENT:69.42
  • Spam Patrol

Posted 16 November 2009 - 08:30 AM

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

With
<?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.

#3 rubikcode

    Newbie [Level 2]

  • Kontributors
  • PipPip
  • 27 posts
  • Gender:Male
  • Location:Singapore
  • myCENT:42.77

Posted 07 December 2009 - 02:58 AM

Quote

<?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.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users