The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
21 views

Conditional Nav Menu Inside Nav Menu Across Multisite Sites

I am attempting to use the main site menu across a bunch of sub-sites in a WordPress multi-site configuration. The sub-sites use the main site's navigation. However, I want to omit one tree of links ...
-2
votes
0answers
25 views

Submenu has disappeared [on hold]

I updated all of my plugins and my submenu has disappeared. I've deactivated all of them one by one and still no luck. I have some error messages in my console but can't decipher them. Any help would ...
0
votes
0answers
8 views

How to move sub menu ul outside of main menu li?

I am struggling to understand how the sub menu of wordpress works. I have set up a menu in the Appearance panel, and I am using bootstrap. When I add a sub menu item, the ul that enclose the sub ...
0
votes
1answer
1k views

Show custom menu in category and its posts

I have a category X of posts. The category page and it's individual posts are all part of a custom menu consisting of pages and posts. My submenu, in the sidebar, works fine for showing on the pages, ...
2
votes
2answers
1k views

wp_nav_menu() mark current item ancestor of custom post type

This solution does almost what I want it to. Only thing is, I have my menu set up as follows: Menu item 1 Menu item 2 Custom post type 1 Custom post type 2 Custom post type 3 Menu item 3 ...
0
votes
0answers
21 views

How to list the menu structure and tag with <li>

I have a menu with sub-items currently set as the Primary Header Navigation. -home (page) -products (category) -stick (post) -stone (post) -about (page) How can I print loop this menu inside ...
3
votes
1answer
39 views

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I'm looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation. ...
1
vote
1answer
2k views

Admin Menu - Highlight top-level menu when on a sub-menu page (without showing sub-menu)

This is the current situation: I am writing a plugin that has a top-level menu page The plugin also contains other sub-menu pages The sub-menu pages are not assigned a parent slug (thus they do not ...
1
vote
1answer
39 views

Add div to specific sub-menu

I researched in google, yandex but had no success. With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu. class Megratron_div ...
0
votes
0answers
15 views

How to add specific menu items to specific sub-level <td> with walker?

I want create a megamenu with four columns on 2nd level submenu (inside div and table). When I add class col1 to menu items, display them inside <td id="c1"> and when I add class col2 to menu ...
0
votes
1answer
20 views

How to get submenu of admin menu?

I user global $menu in one of my plugins to get the list of menu items. But i would like to get the list of of items from a submenu for example from Posts i would like to get Add new, All, Edit ...
1
vote
2answers
720 views

Handling complex multi-level architecture / menu for large site

I am trying to get feedback and ideas for solving an information architecture / content management problem using wordpress. I have a large site ( 1,000+ pages, hundreds of posts ) made up of sections....
0
votes
1answer
30 views

How put the correct URL to sub-menu plugin?

I'm trying to build my first plugin and building my plugin menu like this: function group_panel(){ include('html/example.html'); echo "<h1>{$_POST['data']}"; } function ...
4
votes
1answer
1k views

Custom menu walker: how can i check first item

I need to output different html code only for the first item of my submenus. How can I check in start_el() function if current item is first or not? Example: Menu voice 1 -- Sub 1 -- Sub 2 -- Sub 3 ...
1
vote
2answers
2k views

Adding different classes to anchor in navigation menu

Is this possible? I want to add different classes to the anchors, so not the same on all anchors. How can I do this? PS: I am using this: function add_nav_class($output) { $output= ...
1
vote
1answer
41 views

How to display submenus on page based on referring top-level parent?

I am trying to display a secondary menu on pages that displays all the coordinating sub-pages of the top-level menu item they navigated there from, but my issue is that some pages appear under ...
-1
votes
3answers
478 views

Moving Categories submenu to Media, but still opens Posts menu

I'm developing a very media-centered site with WordPress and am using the default categories and tags on uploaded media using, in part this plugin Media Categories. I am displaying a sub-menu item ...
0
votes
1answer
56 views

Adding Meta Box to Specific Submenu Page

I've created this page: function wpdocs_register_my_setting() { add_submenu_page( 'edit.php?post_type=task', 'View Tasks', 'View Tasks', 'manage_options', '...
0
votes
1answer
25 views

How to separate sub-menu output and keep associated with parent

I am creating a menu like this https://squareup.com/ I have the html,css, and jquery ready. Now, I am trying to: Create the menu items with it's sub-menu items via wp-admin -> appearance -> ...
0
votes
0answers
16 views

Problem with sub-menu container

I try to add container for of main navigation menu. This is entire functions.php of my custom theme: <?php function gzabrze_menu() { register_nav_menu('glowne',__( 'Menu Główne' )); } ...
1
vote
2answers
46 views

How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()

I want to add custom classes to my menu items. For every subpage I show its siblings as a navigation: global $post; if ( is_page() && $post->post_parent ) { $...
4
votes
1answer
13k views

Add custom menu item using wp_nav_menu_items filter

I have added a snippet to add a "Profile" link to my website navigation menu. My code: add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link'); function my_nav_menu_profile_link($menu) { ...
2
votes
2answers
7k views

Remove Categories / Tags From Admin Menu

I want to remove or hide Categories / Tags submenu under Posts in the Admin Menu. I know this works with the themes submenus: remove_submenu_page( 'themes.php', 'widgets.php' ); The same doesn't ...
0
votes
0answers
33 views

Navgation menu with submenu

My menu has to be two rows. First row has to be parrent menu items and second row has to show only selected parrent menu's children. menu structure: 1. parrent 1 a. children 1 b. children 2 c....
0
votes
1answer
51 views

How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?

I want the top nav on a wordpress site to automatically show the child pages. I know that I can edit my menu and add the children, but I want them to appear automatically, and for the menu to update ...
0
votes
0answers
17 views

Has there been any improvements to wp's menu handling?

So I've been snooping around to see if there has been any change to how menus work in WP, but I haven't found anything yet. Some of the problems I have expereinced: Menu items still remains ...
0
votes
0answers
46 views

Saved option shows in page dropdown after page refresh

I'm adding a submenu page with a simple dropdown of pages as a settings, the code looks like this: <?php add_action('admin_menu', 'mytheme_admin_menus'); if(!function_exists('...
0
votes
0answers
301 views

automatically adding submenu items

Here's the solution that @bainternet has posted here: Add child pages automatically to nav menu /** * auto_child_page_menu * * class to add top level page menu items all child pages on the fly * @...
4
votes
1answer
240 views

Add class to top level menu item if it has multiple child levels

I have a WP nav menu, and I need to add a class to any top-level <li> if that item has more than one level of child items (meaning, its child submenu has a submenu too). Like this: <ul> ...
1
vote
0answers
81 views

Main Menu and Sub Menu Items for Footer

So I'm currently trying to figure out how to display both my main menu items and my submenu items separately in my footer. I want to display them both in separate columns (bootstrap) and am having ...
1
vote
0answers
46 views

WordPress Quick Question . How to Get Parent Link in Submenu in My Code

I'm creating a menu walker from foundation 6 but problem is parent link is not click able, so solution might be that if we can get parent link in submenu but have some problem because I'm don't know ...
1
vote
0answers
18 views

Sub menu indicator that links to sub menu

I am trying to create a custom mobile menu for my wordpress site. I have looked around the net for an answer and found similar things or different ways that I can accomplish this but not in the way ...
1
vote
1answer
20 views

category permalinks

i am quite confused about the permalink stuff. So here is whats up... I have a page called tours as well as custom post type called mc_tours. At first i just changed page permalink to mydomain/...
1
vote
0answers
18 views

Creating a menu containing categories and authors

I'm looking for a way to make a menu that contains all categories and when an author has 1 or more post in said category they appear in the dropdown for that category, the links could look like this: ...
2
votes
1answer
85 views

Theme Customizer - How to create a sub panel

In Theme Customizer, i'd like to create a sub panel like this one of wordpress: When we add a new item, a new panel which allows us to pick up a item displays on the right, how can i do the same ? ...
0
votes
1answer
26 views

Add a sub menu page to the Users menu

I added a new link in my WordPress. The url is wp-admin/users.php?page=business&user_id=2 but when I access the page is says You do not have sufficient permissions to access this page. I know that ...
4
votes
1answer
51 views

Is there a way to keep a custom menu expanded when editing a custom post type?

I am building a plugin that has a custom menu with pages under that menu. A few of those pages are custom post types. I would like to have the main menu stay open when I am on one of those custom post ...
3
votes
1answer
49 views

Programmatically adding menu items function replicates in multiple menus

I have the following code: add_filter( 'wp_nav_menu_objects', 'dynamically_add_shop_categories_to_submenu' ); function dynamically_add_shop_categories_to_submenu( $items ) { $...
0
votes
1answer
555 views

How to construct a custom html for submenus

How to write a walker class for constructing a new submenus. for my wordpress theme the submenu is looking like this: <li class="drop"> <a data-scroll-nav='2'>Home</a&...
5
votes
2answers
240 views

Add custom html to last sub-menu item

I'm adding a custom menu to my wordpress theme. I need to add custom html to the final submenu item - before the primary sub-menu closes </ul> I have registered my new menu //functions.php ...
0
votes
0answers
30 views

On pages, dropdown menu not displaying

On the main menu for my site, three items have sub items. On the index page, those sub items appear as a dropdown when I hover over the main items, but if I navigate to any other page, the dropdown ...
0
votes
1answer
6k views

Custom Nav Walker sub-menu HTML construct

I've got my Custom Nav Walker set up and it works fine with the main menu items, and displays them how I want. However the same HTML is being applied to the sub-menu elements which isn't what I want. ...
3
votes
1answer
828 views

Using custom post types in submenu + custom title

I'm planning to use a couple of custom post types for a plugin of mine. The whole plugin should reside under 1 toplevel menu item. Thus I would prefer a menu structure like so: Dashboard Posts [...] ...
2
votes
1answer
45 views

how to only add a top-level admin menu without it creating a sub-level-menu

Here is a the code snippet: add_action( 'admin_menu', 'travel_site' ); function travel_site(){ add_menu_page( 'Travel Site Menu', 'Travel Site', 'manage_options', 'travel-site-menu', '...
0
votes
2answers
105 views

How to Add support for sub-menu item description in wordpress?

I am working on a Custom Nav Walker and I want to use Description field in wordpress menu in my theme. The field works fine as far as for First Level Menu items but when I add something in sub-menu ...
1
vote
0answers
37 views

Change submenu markup

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own. The problem with this is that I would like to change the markup of the submenu and ...
0
votes
1answer
20 views

URL links consistent with menus?

I'd like to have a URL links consistent with menus on the page. For example: Menu1: Submenu1 item1 item2 Submenu2 item3 item4 Menu2: Submenu... etc.. The corresponding links ...
0
votes
1answer
339 views

Mark menu item as current-menu-item for category

I have some categories on my WP website. When users sees this categories and posts from them i want to mark one of menu items as active. How can i set one of my menu items to have class "current-menu-...
2
votes
2answers
2k views

Add an admin page, but don't show it on the admin menu

I have a custom plugin 'Charts' that has it's own menu. In that menu are links to the 3 pages for the plugin - 'Charts', 'Add Chart' and 'Edit Chart'. However, I don't want to display the link to '...