Javascript,Nodejs,MongodDB,WordPress,CSS,PHP

LightBlog

Thursday, August 16, 2018

How to register menu in wordpress

Just copy and paste it in your functions.php

 <?php

function register_my_menus()
 {
 register_nav_menus( array( 'new-menu' => __( 'New Menu' ), 'another-menu' => __( 'Another Menu' ), 'an-extra-menu' => __( 'An Extra Menu' ) ) );
 }
add_action( 'init', 'register_my_menus' );

?>

No comments:

Post a Comment