WordPress custom menu

How to create WordPress custom menu

Step 1. register_nav_menu()

In functions.php add the following code

I after adding this code the new menu will started showing in admin (Appearance->menu)

wordpress custome menu admin

We can register multiple menus at same time

Step 2. wp_nav_menu()

Call ‘ wp_nav_menu()’ wherever you want to display the newly created menu

I am just adding in footer.php

 

new menu in footer

 

ref: https://codex.wordpress.org/Function_Reference/register_nav_menu

ref : https://codex.wordpress.org/Function_Reference/register_nav_menus

  Like
Author: bm on June 22, 2016
Category: wordpress
Tags: ,

Your comment:

Your Name

Comment:




Last articles