You may come across the problem that in “appearance” section menu is missing! The question is: how to add menu option in appearance in wordpress? In this article on wpexpelor, I’m going to delve into solving the problem. Stay with me!
In most of the new wordpress themes, the menu option is omitted from the appearance section. Instead, you find the “editor” part.
Click on “editor,” and on the next page, click on templates.
Then click on the “+” item, and we choose the “custom template” option.
Choose a name you like and click on the “create” option.
On the next page, click on the “navigation” item to add it to the page. Add your links to the menu by using the “+” icon.
On the next page, click on the “navigation” item to add it to the page.
Add your links to the menu by using the “+” icon.
After you are finished, click on the “save” button.
After you are finished, click on the “save” button. Now check your website.
After you are finished, click on the “save” button. Now check your website. The menu you have created is now there In the header part. As I said before, most of the newly published wordpress themes as twenty sixteen and … have implemented this method for menus.
Most of the advance and premium wordpress themes support menu options by default. So, the simple solution is that if your wordpress theme does not have the option, change it!
For example, even Astra, hello Elementor and twenty sixteen are some really simple wordpress themes that support menus.
This part is for wordpress developers. I’m going to teach you how to add menu in appearance in wordpress by using some simple code. Suppose you are using a customized wordpress theme or even something that is not standard. In this case, you should add a “menu option” to your wordpress theme. It is easy.
To do so,
- open “functions.php” and add this code:
register_nav_menus(
array(
'primary_menu' => __('Primary Menu', 'text_domain'),
)
);
Note: consider instead of “text_domain,” you should set your wordpress theme name.
- Use this code to the desired place to call the menu.
<?php
wp_nav_menu(
array(
'theme_location' => 'primary_menu',
)
);
?>
You can use it any place that you want, but people mostly use menus in the footer and header part of the site. As an example, I have edited “header.php” and put the code there. Now, if I open the “appearance section,” we can see the menu is there!
I hope this article of wpexpelor will do you good! I would be delighted to see our comments below, or if you need to ask a question, I’m here for you.
Best.