Posted By

oneupdzn on 05/05/13


Tagged

menu wordpress custom


Versions (?)

Wordpress 3.0 custom menus


 / Published in: PHP
 

Wordpress 3.0 custom menus

  1. FUNCTIONS.PHP // REGISTERING
  2.  
  3. // register three menus
  4. function register_menus() {
  5. register_nav_menus(
  6. array(
  7. 'primary-menu' => __('Primary Menu'),
  8. 'secondary-menu' => __('Secondary Menu'),
  9. 'tertiary-menu' => __('Tertiary Menu')
  10. )
  11. );
  12. }
  13. add_action('init', 'register_menus');
  14.  
  15. HTML // DISPLAYING
  16.  
  17. <?php wp_nav_menu( array( 'theme_location' => 'primary-menu' ) ); ?>

Report this snippet  

You need to login to post a comment.