Add some Contextual Navigation Menu Features. Provide contextual menus as Navigation Menu, Breadcrumb Navigation Menu and Navigation Submenu Widget.
What is a contextual menu?
For example, you have a category entry in your primary menu. But when you read a post of this category, your menu has no selected items. Your entry is like orphan.
With Contextual Nav Menu, no more orphans entry. Taxonomies (categories and tags), pages, posts (custom types too) are linked to there parents if they are in the menu.
And if the parent is not in the menu? There still have a solution! You can add to each taxonomy (category and tag), page, post (custom types too) a parent menu item.
With the same mecanism, your Contextual Nav Menu Breadcrumb won’t be blank anymore, it will follow as much as possible your menus structure and is fully customisable.
The Contextual Nav Submenu Widget displays a contextual menu related to the highest parent of the current item.
- Add a parent menu item to each taxonomy (category and tag), page, post (custom types too) individualy or with bulk actions
- Customise your breadcrumb: titles, image of the home link, menus order
- French and English support
- Polylang compatibility (breadcrumb is fully multilingual)
- Multisite compatibility
- Contextual Nav Menus are accessible
- Contextual Nav Menus are ready to use with all themes. The plugin does not provide any predefined themes.
Contact me if you want to know how to customise your menus.
- Upload “contextual-nav-menu.zip” to the “/wp-content/plugins/” directory.
- Unzip archive.
- Activate the plugin through the “Plugins” menu in WordPress.
- Place for example “contextual_nav_menu( array( ‘theme_location’ => ‘primary’ ) );” in your templates to display a contextual nav menu for the primary theme location (see WordPress documentation for more details, arguments are the same).
- Place “contextual_nav_menu_breadcrumb();” in your templates to display a contextual nav menu breadcrumb.
For a full customisation of the breadcrumb, “contextual_nav_menu_breadcrumb” accepts an array as param. These are all accepted keys and there possible values:
- menu_class – CSS class to use for the ol element which forms the menu. Defaults to ‘breadcrumb’.
- container – Whether to wrap the ol, and what to wrap it with. Defaults to ‘nav’.
- container_role – The role of the container. Defaults to ‘navigation’.
- container_class – The class that is applied to the container. Defaults to ‘nav-menu-breadcrumb’.
- container_id – The ID that is applied to the container. Defaults to blank.
- fallback_cb – If the menu doesn’t exists, a callback function will fire. Defaults to ‘wp_nav_menu’. Set to false for no fallback.
- before – Text before the link text.
- after – Text after the link text.
- link_before – Text before the link.
- link_after – Text after the link.
- echo – Whether to echo the menu or return it. Defaults to true.
- depth – how many levels of the hierarchy are to be included. 0 means all. Defaults to 0.
Frequently Asked Questions
My breadcrumb displays more links it should, is it normal?
Yes, the element you are viewing is certainly linked to a menu entry “naturaly” and “virtualy”.
Just edit the element and be sure that the “Select Menu” is set to “None”.
My Contextual Nav Submenu Widget is not visible, is it normal?
The Contextual Nav Submenu Widget only shows up if the element you are viewing is related to the menu you selected.
If it is, the menu must have at least 2 level to show up too.
Be sure your widget is well configured too.
For example if the starting depth is set to 0, the proof must be set to at least 2.
If the starting depth is set to 1, the proof must be set to at least 3.
- Stable version.
- Code refactor.
- Previous Stable version.
- Initial release.
- just click “upgrade” in the plugins page
- No need to upgrade, modifications on readme file.
- Initial release.