News Update :
Home » » Enrigistrer a new menu in WordPress

Enrigistrer a new menu in WordPress

By: Unknown on Wednesday, 18 February 2015 | 10:56

By default, WordPress has two menus ; Primary and Secondary Menu top menu. If for example you want to add a sub menu at the top of the website, you must first create a menu in functions.php and then in the theme call up the menu in question.

Save a menu in WordPress

In your file f unctions.php , add the following line:


// Preregister UN Noumea menu
register_sub_menu( 'secondary', __( 'Secondary', 'twenty twelve' ) );

 

Add a menu in WordPress theme

Then you can add the following lines in your chart:



<sub id="tremendous" role="navigation">
  <h3><?php wp_sub_menu( array( 'theme_location' => 'secondary' ) ); ?></h3>
</sub>


Create a new menu in WordPress dashboard

Finally, you must create a new menu in the WordPress dashboard and check the menu in question.
 
Contact Us | Privacy policy | Term of use | Advertise with Us | Site map
Copyright © 2011. Blogging Brain . All Rights Reserved.
Design Template by Blogging Brain | | Powered by Blogger