New Wp Menu System on Old themes…

With this article i’ll show you how to use new wordpress menu system on old themes (before 3.0). Let’s Begin.

Open your theme’s functions.php with your favourite php editor. After that add this code into file. First code for theme menu support, second code for register a menu area for use.

// New Menu Support For theme //
add_theme_support( 'nav-menus' );
register_nav_menu('main', 'Main Navigation Area');

After that save functions.php and upload the server. After that open your header.php and replace all that code with your old menu code (wp_page_menu, wp_categories_menu).

<?php wp_nav_menu( array( 'theme_location' => 'main', 'sort_column' => 'menu_order', 'fallback_cb' => 'wp_page_menu' ) ); ?>

After that you can use new menu system with your old theme. And if you don’t wat to use new menu. This code add wp_page_menu for you.

That’s All.


Related posts:

If you enjoyed this post, make sure you subscribe to my RSS Feed
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
 

Highslide for Wordpress Plugin