Questions tagged [menus]

Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.

Filter by
Sorted by
Tagged with
1 vote
2 answers
10k views

add taxonomy as one of menu items

I have created a custom Taxonomy called Documents and I want to show it as one of menu items, I am only able to choose from its posts. How shall I do that? As below picture I am not able to choose ...
0 votes
1 answer
574 views

Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs

I'm trying to build a sidebar menu displaying child pages of a grandparent page, his siblings and their childs, and keep those siblings and childs available while navigating through them. I've been ...
0 votes
3 answers
896 views

How to Structure Pages and Subpages

I'm trying to create a church site using WordPress. The following is a small sample of the page structure I'm trying to create: About Staff Statement of Faith Contact Ministries Furnace Prayer ...
0 votes
2 answers
240 views

Question regarding register_nav_menus();

I got below code in TwentyFourteen theme's function.php file. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'twentyfourteen' ), 'secondary' => __( 'Secondary ...
0 votes
1 answer
187 views

Installing compact search in the main menu?

Please tell me how to install compact Search in the main menu WordPress, just as is done in the themes: Avada, Vantage, Twenty Fourteen. Or plugin UberMenu. In the themes Avada I like most. Site made ...
1 vote
1 answer
2k views

Show Wordpress Menu On External Site

So I have been working on a site using the theme Vantage and I am wanting to take the menu from the site and embed in another site in a subdirectory below, I have searched all over the internet trying ...
3 votes
0 answers
1k views

How to add ID and class in nav menu walker?

I would like to set up a custom walker that produces the following output: <div id="navbarHolder"> <div id="navbar"> <ul> <li><a id="nav_about" ...
0 votes
1 answer
121 views

Hide category links if there is nothing in the categories - Main Navigation submenu item

In my main navigation menu I have category links that are sub menu items: Example: Main Navigation: Listings Sub menu category items: Boating, Camping, Fishing So basically if there is no listing ...
1 vote
2 answers
861 views

Show number of articles in menu

I want to display a number of articles in a certain category which is hooked to a menu item. It should look like Bootstrap's "badge" component. Now I've got: and what I want to achieve: Do I have to ...
3 votes
1 answer
458 views

Walker class: Problems with understanding how walk() method can be called without error

I am struggling with understanding how WordPress uses the Walker class. In particular, I don't understand the walk() method (I think). First, let me explain what I understood: When calling ...
1 vote
0 answers
324 views

Custom Menu's - Disable Link checkbox

I've been trying to write a plugin that adds a checkbox (below the "Open in New Window/Tab" checkbox) to the Custom Menu pages/links. I've been able to add the Checkbox and change the wp-includes/nav-...
0 votes
1 answer
175 views

How can I add a class to a nav menu when I'm viewing a child page?

I'm using bootstrap in my theme, so I have a requirement that I add a class of active to the current nav menu item. I was able to achieve this by using the nav_menu_css_class filter add_filter('...
0 votes
0 answers
41 views

Backend - Categories and Menus conflicts

I'm having a big problem with my WP instance which is frustrating. Every time I add a new Category ( a simple default category with no custom posts or taxonomies ) it adds, as expected, that new ...
0 votes
1 answer
1k views

How do I show a different secondary navigation menu for each section of my website?

My site is organised into three sections, like this: Reiki Basics (page ID 499) – page 1.1 – page 1.2 – page 1.3 Practice & Study (page ID 501) – page 2.1 – etc Courses (page ID 471) – page ...
1 vote
2 answers
1k views

wp_post->post_parent object returning 0

I'm developing a Wordpress theme and I've registered a new menu location (called primary menu) and am using a menu with it. In my menu, I have a page called "tier-2 page" under a page called "tier-1 ...
1 vote
0 answers
478 views

Page content loading issue using Walker_Nav_Menu

At each page refresh, the page loads in steps, first the header with main menu and then after 1 second, the page loads the rest of content. I use the following code to display the a mega menu on my ...
0 votes
0 answers
23 views

Any reason why widgets/menus get emptied when I updated custom theme code?

Deployed my site over git last nite, and client came back saying some menus in the the footer widgets had disappeared. I looked in the admin, and the widgets were still available but all the items ...
1 vote
0 answers
2k views

Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?

I'm working on a new theme to replace an old one. The existing theme has custom menus and I can't figure out why in my new theme a call to has_nav_menu is always coming back false. In my functions....
1 vote
1 answer
201 views

Wordpress empty Nav Menu error

i have created Multisite. i have assigned menu for the first sub domain while for the second sub domain i have not assigned Menu. i just enabled the Debug mode and got Following error: Notice: ...
1 vote
1 answer
8k views

How to show only one category in breadcrumb navigation

I added breadcrumb navigation to WordPress & I'm facing one problem. Here's the function.php code of the breadcrumb: function ux_breadcrumbs() { if (!is_home()) { echo '<a href="'; ...
0 votes
1 answer
961 views

Sidebar current menu item for parent

I have a menu within the sidebar of my site. When you click on the child element of the menu, the li tag adds a current_page_item class to the li tag. When you land on the page its the parent page ...
0 votes
0 answers
91 views

how to display wordpress navbar with top menu outside wordpress system

i want to display my wordpress top navbar outside of wordpress system in one of my php site, so that whenever i change the wordpress navbar the changes will reflect on my php site. How to do that? I ...
6 votes
3 answers
13k views

Add Dividers or Separators Between Nav Menu Items

Does anybody have an idea on how to allow a user to drop in separators or dividers between certain nav menu items? Google only seems to bring up rookie CSS tips for first/last child selectors but I ...
0 votes
1 answer
160 views

How to add drop symbol to parent nav items which have child

I have a navigation system like this: As you can see I have two Parent Menus as "Projects" and Plans which they have some sub menus. Now when the result rendered I am getting a navbar like this: ...
0 votes
2 answers
2k views

How Do I Add Images To Main Navigation Menu

I have a navigation menu but I need to be able to have background images with multiple states. There would be a background image for the multiple link states: normal, hover, and current. What is the ...
0 votes
1 answer
3k views

Hide menu items if the page content is empty

i am looking for solution to hide (just not print) menu items if the page content is empty. by default wordpress create menu item when new page created. and that ok. but what i don't want, is when ...
2 votes
1 answer
1k views

wp_nav_menu - page template name as item class

Is there any way to display template name (or page-template.php filename) in each menu items' class? Maybe using wp_nav_menu walker? Specifically, I'm using standard menu call: wp_nav_menu( array( '...
0 votes
1 answer
24 views

After theme change the menus have to be manually linked to the corresponding theme location

When publishing a new version of a theme after I upload and select the new version of the theme the menus aren't visible on the site anymore. Everytime I have to link them to the corresponding theme ...
1 vote
1 answer
829 views

Can't include Language switch in Nav Menu

I am trying to add to my menu bar some language elements. I'm using the qTranslate plugin and I would like to add the language switch to the menu bar. My them is calling in the header.php <?php ...
0 votes
2 answers
3k views

Making wordpress menu horizontal [closed]

Hey guys am new to wordpress development actually.I am trying to make my wordpress menu horizontal at the top below the title name. My header.php In my header file i have assigned the menus with a ...
0 votes
1 answer
401 views

Get custom classes in Wordpress Navigation Menu

i'm a beginner to Wordpress. I have a question is how to get only classes we put in CSS classes box in Navigation Menu? Not all with the default Wordpress classes. The purpose of this is i want to ...
0 votes
0 answers
35 views

Custom menu creation

So I wrote my first custom menu with a walker. In the admin panel I see the locations, so they are registered. The problem is that the very first menu I created gets added to all the locations. I ...
0 votes
1 answer
2k views

active menu in post page

I am showing a wp menu with the following function: <?php wp_nav_menu( array( 'theme_location' => 'primary', ...
1 vote
0 answers
30 views

Override customizer values on a per-menu base

suppose I have a few options in the theme customizer, and I might want to show for example 5 different categories listing menus in the site. In the customizer I can set options for all of those, ...
0 votes
2 answers
181 views

Wordpress Menu Exchange On Tablet's Orientation

I am using the plugin PHP Browser Detection and I want to achieve different menus for different devices. I have set them up called primary and mobile. Now, I want to switch those on used device. ...
0 votes
1 answer
172 views

Hiding menu on mobile only when viewing posts?

I would like to hide menu on mobile only when viewing posts. Menu at the homepage should be visible on mobile but not the other pages. How can I do it? Here is the menu snippet: <nav class="...
0 votes
1 answer
31 views

What happens when you create/edit a menu

I need to know this for a plugin I'm developing: What happens when a user creates a menu, add/remove menu items in the admin, what updates are made in the database, what tables/columns are affected?
0 votes
1 answer
455 views

Wordpress Menu Exchange for Mobile Layout

I want to have two different menus for desktop and mobile phone users. So, I have created two places for two menus (primary, mobile) with this function: functions.php: function is_register_my_menus(...
0 votes
1 answer
1k views

How to hide page links from theme menu

I'm working on a plugin, I programatically create some pages in posts table, the links appear in the theme menu(front end), I don't want some of these page links to appear, how do I do this?
0 votes
1 answer
76 views

Active page link not getting class assigned

I'm having problems with one of my menu items on http://itsnwa.com/ - When you enter the site, 'Work' should be bold and underlined, the same happens if you go to '50mm', but on 'Findings' this doesn'...
0 votes
2 answers
2k views

Appearance > Menus

I have added custom WordPress admin menu and pages, however, I would like for it to appear in the "Appearance > Menus" section so that the user can add it in the menu structure of their website. ...
0 votes
0 answers
72 views

Showing main menu and child menu in diffent places in a same page

This question may sound a bit novice, but I am facing a problem. I have a menu structure like this: Home About -History -kontact Posts -Category1 -category2 For design purpose, I have 2 different ...
0 votes
0 answers
65 views

Add items to a menu

I'm reading The Absolute Beginners Guide to Wordpress, but possibly it's too advanced for my purposes. I cannot get information about basic navigation, wiring the menu to pages. I've created three ...
1 vote
1 answer
2k views

View h2 content tags of a page in sub menu

I think I'm trying to do something unusual I guess because I can't find it anywhere.I want to have a submenu base upon content off the associated page. e.g. In my menu there is a menu-item called "TOP"...
0 votes
1 answer
5k views

Removing a page from the header menu

My site is using the Hemmingway theme, I have a menu in the header. This is the menu whose structure results from assigning a "parent" on a page's edit form. One of my pages is less important and ...
0 votes
0 answers
56 views

Using 'array' method in wp_nav_menu causes it to disappear

I want to change the menu_class on my navigation bar, but the second I try to use the 'array' method to display my nav, it disappears. This works: <?php wp_nav_menu('Profit.Ology'); ?> This ...
0 votes
0 answers
56 views

Using categories and pages in menus

I've got a problem with mixing categories and pages within menus. As a fictional example: - About us (custom page template) -- What we do (page) -- Key staff (page) -- CEO blog (category) ...
0 votes
0 answers
44 views

extra <a> tag is added in wp_nav_menu

I am a wordpress lover and i am facing this issue for the first time, below is the code i am using for making menu to be displayed. <?php wp_nav_menu( array( 'theme_location' => 'primary', '...
0 votes
1 answer
641 views

Link from navbar to categories

I have a navigation bar in homepage. I don't want show categories in navigation bar. I also do not want use a dropdown menu. I just want to have a link to a page that show all categories. I want ...
0 votes
1 answer
61 views

WordPress - Apperance > Menu

How do I use the menu on the dashboard under Appearance > Menu - http://prntscr.com/5052sl The one I'm using is based on page arrangement, so all my pages are displayed on the menu under some pages. ...

1
40 41
42
43 44
65