web2feel.com – Free wordpress themes – Tutorials – Tips and tricks

Free WordPress Themes for everybody

Categories

Introduction of custom navigation menu system is a highlight of the WordPress 3 release. This gives the theme users so much freedom to configure the navigation menu without touching a single piece of code. Now it will be possible to arrange menu items and configure the hierarchy of the menu items on a fly. Web2feel themes created prior to the WordPress 3 release will not have this feature enabled on them. So you wont be able to configure the menu items on those themes through the custom menu interface. So I decided to make a screencast explaining how one can configure the old themes to harness this new menu feature.

The screencast is of 10 mins divided into 2 parts of 5 mins each due to the time limit of the screenr.  To enable the menu feature first you need to edit the function.php file of your theme. Just open the file on any text editor and add the following code in it.

 
register_nav_menus(
	array(
	'primary'=>__('Primary Menu'),
	)
);

Now we have enabled the custom menu feature and declared a menu location called primary .Next step is to place the navigation menu code where you want the menu to appear. In most cases it is on the header.php file.  So look for the existing  page menu or category menu encased in the ul tags.

 
		<ul>
			<li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>/" title="Home">Home</a></li>
			<?php wp_list_pages('title_li=&sort_column=menu_order');?>
		</ul>

delete it and paste the following code in its place.

 
<?php wp_nav_menu( array( 'theme_location' => 'primary','fallback_cb'=> '' ) ); ?>

Now you have enabled the menu feature and you will be able to configure the menu items from the menu admin panel.

Watch the screencasts

Part -1

Part-2

I hope it was useful to you all.. Thank you

Reference:

WordPress Codex

Justin Tadlock ( Detailed explanation of the feature, developers are suggested to read this )



  • Hmm really excellent video.thanks a lot for sharing..
  • Leaf
    This summer you can choose Christian louboutin wedges. A pair of beautiful cheap Christian Louboutin wedges can keep you feeling effortlessly fabulous every day this summer. These can be matched with casual jeans, but these can also be dressed up with a great yellow dress.
  • Is it me or do the thumb nails not work in wordpress 3.0?
  • thanks for the tips :)
  • yeps, nice video dude..
    you explain it clearly..
  • nice video.. thanks
  • thanks for the sharing.. it help me a lot
  • Straightforward tutorial. Thank you for sharing. I will benefit this in time.
  • Ellie
    The video was excellent. You rock!
    Ellie
  • Thanks for the post, I like to find inspiring ideas and practical knowledge to help bolster my own awareness for web design and development in general. Blogs like yours are a great source of inspiration for me and I will keep an eye open (on your rss feed) for more of your brilliant posts. Cheers!
blog comments powered by Disqus

Feature your theme here

kill the spill

Sponsors

  • Theme forest
  • Gator
  • Codebreaker
  • Your Ad Here
  • Your Ad Here

Recent Uploads

My brother is getting married tomo: 22nd Aug. Wishing him the best..

Contact Me

Your Name (required)

Your Email (required)

Subject

Your Message

4+1=?