How to add custom menu in wordpress nav-menu?

11:23:00 1 Comments A+ a-

When we going to use over own template in wordpress. The most important part of template to make dynamic our custom menu with wordpress default menu with php code. you have just follow some simple steps .

Step 1:- Create your menu css according to wordpress menu css. Its not so difficult dear. Its very easy to do .
You just give a class under UL tag.
 because in wordpress all <li></li> css is based on this class only. So create you menu css with the style like that-

Step 2:- After the css of your menu according to WP. Replace your ul with wordpress class.
like :- 

After code :
  'primary', 'menu_class' => 
'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>

Before edit
  'primary', 'menu_class' => 
'menu', 'menu_id' => 'primary-menu' ) ); ?> 

In about code we just have to replace our class under ul named menu in the palce of nav-menu.

You have done enjoy.




1 comments:

Write comments
Anonymous
AUTHOR
29 August 2015 at 23:31 delete

Good work keep it up.

Reply
avatar