In this topics we will discus on WordPress Menu.
Now open your header.php file and write the following code any where you like(For Main Menu)
After choosing all menus save the changes.
Now go your site and see what happened.
- How to Register menu
- How it put any where you like
First of all we register menu for my WordPress template. For this write menu register code on function.php file you have already in your template folder. It's like as
register_nav_menus(array(
'primery'=>__('Main Menu'),
'footer'=>__('Footer Menu')
));
Here I register two menu named Main Menu and Footer Menu. Remember that we will call menu by array key (primery, footer).
Now open your header.php file and write the following code any where you like(For Main Menu)
<?php wp_nav_menu('theme_location=primery'); ?>or
<?phpAnd then open your footer.php file and write the following code any where you like(For Footer Menu)
$args=array('theme_location'=>'primery');
wp_nav_menu($args);
?>
<?phpNow go wp-admin->Appearance->Menus
$args=array('theme_location'=>'footer');
wp_nav_menu($args);
?>
Create Menu from here and select where you want to put this menu from bottom check box.Then Save Menu.
Now can manage menu from Manage Locations tab. Here you can see the menu areas and menu you already create. Select menu from droop down menu.
Now go your site and see what happened.
Thanks for reading this topics. For any question on this topics please write your question/comment/advice on comment box bellow.
How Do I Chose The Best WordPress SEO Plugin For My Website?
ReplyDeleteHow Do I choose A Good WordPress Hosting Solution?
Can Free WordPress Themes Hurt My SEO?
What’s better for SEO — Installing WordPress On A New Domain, Subdomain Or Subfolder?
Fix WordPress lost posts “404 Error Found” Problem
How to fix Error in database connection
Fix WordPress lost posts “404 Error Found” Problem
11 Best eCommerce wordpress themes
How to fix wordpress Parse Error: syntax error
15 very basic wordpress errors
9 Important Steps to Increase WordPress Loading Speed
Where can I find help with the CSS problems I'm having?
Why does the password emailed to me look weird?
Why do I get an error message about Sending Referrers?
Are there are any problems with using MySQL 4.1.7 for WordPress?
Error Establishing Database Connection
Pretty Permalinks 404 and Images not Working
Do I need to know PHP to use WordPress?
I’ve Heard That WordPress Is Search Engine Optimized (Out-Of-The-Box). Is That True?
I’ve Installed A WordPress SEO Plugin. That Means I Don’t Need An SEO Consultant, Right?
Will Adding A Post To Many WordPress Categories Be Good For My SEO?
your guidence is appreciated.I save more time by avoiding errors and work smoothly, this is because of you.WordPress Errors.Keep sharing.Thanks a lot.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteVery Helpful. Thanks for such Information
ReplyDelete24x7 WP Support
WP Tech Support
At Digital Marketing Thanks for this amazing content.
ReplyDelete