How to add custom menu in wordpress nav-menu?
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 :
You have done enjoy.
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 commentsGood work keep it up.
Reply