Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to be able to tell the wordpress menu's on what page to show.

The way my menu is shown now:

How it looks default

I want to have the option in the menu settings like so:

Where I want the setting

But I cannot find any documentation about the menu settings. Did I miss something?

I am able to create a list of pages. I just cannot find where I can add these settings.

Edit

I created a workaround. I am using the meta boxes on the pages and a dropdown to select the menu. So now I can choose a specific sidebar menu for each page instead of a menu for specific pages.

share|improve this question
    
I think it depends on your theme. But as a starting point codex.wordpress.org/Navigation_Menus should help!! –  sri Jun 20 at 8:00
1  
I seen that link a lot of times, there is no information about adding settings to a menu. Only create and display a custom menu... –  Bondye Jun 20 at 8:01
    
Ouch. I think that is a native Joomla option, apparently not in WordPress. For your site, you could create custom output category/pages.php files and then add a unique custom menu there but that is a total pain in the neck. You'd have four output .php pages and four unique menus, one for each selection above. One easy way to implement is to use sidebar widgets as your primary navigation tool. the custom menu widget tool is pretty simple. Create a menu for each page, assuming you have unique templates for each. Note, sidebar is not the best word. You can put a widget anywhere. –  zipzit Jun 20 at 8:10
    
I am aware of the sidebars and widgets. These small website parts that are also not connected to a page. I don't want to use sidebars and widgets and have disabled them because I don't use any of them. Anyway, I think the menu locations are settings of the menu, not a setting of a widget which contains a menu. –  Bondye Jun 20 at 8:23
    
Is your question just "How do I add custom menu settings?" or is it also "How do I use custom menu settings to display a menu on certain pages only?"? –  engelen Jun 20 at 12:47

3 Answers 3

If you are willing to re-engage your widgets and want a simple solution, you can use a plugin called Display Widgets. I have used this and use the text portion where you can add links to where you want to go. It works whether the links are on you own site or to another site. It has a space down below the text where you can choose which pages to show or hide. You can still remove the widgets that you do not use.

I played around with the menus for quite a while before I looked for and found this plugin. It works well.

You can find it in the Plugins section of WordPress.org.

share|improve this answer
    
Thank you very much! But I am not looking for an extra plugin. And I don't use widgets since these floating website parts are too hard to understand for some of my customers. –  Bondye Jun 20 at 14:19

I think using a plugin for this is better, so you can keep the functionality even if you change themes in the future. Check out this plugin. It does what you want, but slightly differently than how you mocked it up.

https://wordpress.org/plugins/page-specific-menu-items/

If this helps, please up vote or accept as the answer. Thanks!

share|improve this answer
    
I have tried this plugin. With this plugin, you can only select a menu for a specific post type. I want to select the menu for each page. –  Bondye Jul 15 at 6:33
    
If you only have one menu across the site, and you just want to hide certain links in that menu when a user is on a certain page, this plugin does that. After you select the post type you want the menu on (page is what you want, or more) then go to edit a page, and you can check the links you want hidden. This other one does it the opposite way. You select a menu from a metabox on the edit page screen, so you need multiple menus to choose from: wordpress.org/plugins/ce-wp-menu-per-page –  Mark.C Jul 15 at 19:46

One option would be to make custom templates for each menu that you have. (That refers to the theme locations check box) Then on every page, you choose the template that you want it to use and it will also use the menu associated with that template.

https://codex.wordpress.org/Page_Templates

It gives you the same result I think you are looking for but rather than telling each menu what page it shows on, you will be telling each page what menu will show on it. An added benefit of doing it this way is that there is no way for you to accidentally tell two menus to be in the same place at the same time.

share|improve this answer
    
Yes, I have looked at this. But the developer never knows how many menus the user needs. So I have to create a lot of templates to cover them all. template_a.php, template_b.php, template_c.php etc. –  Bondye Jul 24 at 6:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.