Tagged Questions

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.

learn more… | top users | synonyms (4)

1
vote
0answers
25 views

Appearance Menus Screen - menu item drop down menu not functioning

According to WP, there should be options to remove/edit each menu item on a menu under appearance, but this option isn't showing up for me in Chrome or Firefox. I have administrator control of the ...
0
votes
0answers
16 views

Getting Wordpress Permalinks to match menu navigation

I am trying to get my permalinks to match the location of where the page/posts lie in the navigation menu at the top of my page. For example, my travel site has has a post about Torres del Paine ...
1
vote
1answer
39 views

How to add custom classes to more than one separate menu's a link in wordpress?

Here is a link to my website: website I have placed the following code to this document in /wp-includes/nav-menu-template.php Towards the end of the code are several lines that start with ...
0
votes
1answer
59 views

How to programmatically add elements in a custom menu

In my WP custom menu, one item has a dropdown list below it that lists all instances of some CPT. The only way I know to do that is by creating the list somewhere else in the DOM with PHP and then ...
0
votes
1answer
62 views

Active menu item / category

I was wondering if there's any way to discover which categories are "active" on a category archive page. This is for the purpose of menu highlighting. To demonstrate, compare these: (1) Parent ...
-2
votes
1answer
29 views

wp_nav_menu doesn't add current-menu-item when there is an url parameter [closed]

wp_nav_menu doesn't add the current-menu-item CSS class when there is an url parameter in the url. Is there a way to ignore the url parameter?
0
votes
0answers
19 views

strip_tag not working in header.php

Used code I found on css tricks to remove the li tags from wp_nav_menu. $menu_parameters = array( 'container' => false, 'echo' => false, 'items_wrap' => '%3$s', 'depth' ...
0
votes
0answers
15 views

How to increase menu size limit? [duplicate]

After searching for answers, I am still stumped. I am not very savvy but tried creating a php.ini file, editing .htaccess file, nothing lets me go above the 85 menu item mark. It seems to be a ...
0
votes
0answers
48 views

Superfish Menu is incompatible with the latest jQuery version (1.11.0)

I tried to convert an HTML template into a WordPress theme, and it seems like the Superfish Menu v1.7.4 is not compatible with the WordPress' default jQuery version (which is v1.11.0). I've tried to ...
0
votes
1answer
45 views

2 wordpress site same database

I have twoo websites on worpdress platform: http://fian.ro/ http://nuovafattoria.ro/ On the server there are 2 different folders with same files, same config but one of them has: ...
0
votes
1answer
50 views

Add different span class to wp nav menu

Here is my html for the menu: <div id="main-menu-container"> <ul id="main-menu"> <li><a href="#"><span aria-hidden="true" ...
1
vote
0answers
84 views

How to open modal window when clicking a WP menu link?

I'm making my first site with WP, I'm a Joomla Developper. I'm using wisten theme, and WP 3.9.2 I want to create a link in my the navigation that opens a modal window (not a new page) on click. ...
0
votes
1answer
174 views

Custom Taxonomy Navigation, with current menu items for children?

Is it possible to have a custom taxonomy navigation, with added active/current-menu classes if the post your on is within that category/custom tax? e.g you have a custom taxonomy called... Weather. ...
0
votes
0answers
134 views

Wordpress Wp_nav_menu How to create Columns in submenu

i have been trying to develop custom navigation in wordpress. i want to add columns in sub menu item. i want to add images in navigation as well as create Multi column Navigation. Please check this ...
1
vote
2answers
40 views

Need Random Category Nav Menu

I have set my category navigation menu to display home and 5 of my categories and their respective posts when the category tab is clicked, as that is all the space there is to display in the menu bar. ...
1
vote
0answers
183 views

Use custom walker to add taxonomy terms to main nav menu

I created a Custom Post Type: Product and a Taxonomy assigned to it: Products So under that Taxonomy I can add different types of products (terms if i'm not mistaken). When adding new products I get ...
0
votes
2answers
39 views

jQuery not working when used with wordpress menu

I'm using a starter theme that was provided to me by a friend, and have successfully implemented jQuery several times on the website. I want a background image inside a div to change when the user ...
0
votes
1answer
22 views

How do I remove a menu from a theme?

I have a very simple question, how do I remove a menu from a WordPress site? Is there a plugin out there that can handle this or do I have to go into my theme's code and remove something from there?
0
votes
0answers
61 views

wp_nav_menu list children if on parent page but sibling if on sibling page

For example: About Page (Parent) History Mission & Vision Location If I'm on the About Page, I need the wp_nav_menu to show the three children pages. But if I'm on the History page, I need it ...
0
votes
0answers
40 views

How do I add a class to every menu item automatically in a nav menu?

At the moment I'm adding a button element around the menu anchors using this markup: $defaults = array( 'theme_location' => '', 'menu' => 'main-nav', 'container' ...
0
votes
0answers
41 views

How to add <button> to wp menu using bootstrap 3 framework

I need to figure out a way to add a <button></button> element to a link inside of the wp menu I currently have this markup: $defaults = array( 'theme_location' => '', 'menu' ...
0
votes
0answers
16 views

Enable “CSS Classes” for menus by default

I'm wondering if it's possible to enable "CSS Classes" for Appearance > Menus by default when a theme (or a plugin) is activated? Like: function my_theme_activate_css_classes_for_menu(){ // What ...
0
votes
0answers
17 views

getting specific items from menu

In trying to build 2 linked menus, lets say the hierarchy is like this (In the menu options) - A -- B -- C -- D -- D1 -- D2 - A1 The first menu I want it to be fixed so I fetched it with ...
1
vote
1answer
20 views

Custom Menu url is Empty

I added a new menu using this code: wp_update_nav_menu_item($menu->term_id, 0, array( 'menu-item-title' => 'Custom menu', 'menu-item-url' => 'http://mylink.com', ...
0
votes
1answer
18 views

menu_class showing up on DIV instead of UL

I was having an issue where my menu was being created using: wp_nav_menu(array('theme_location' => 'main_menu', 'menu_class' => 'sf-menu'')) The resulting HTML was like this: <div ...
0
votes
1answer
60 views

Add a Submenu from Another Submenu in a Custom Theme

Good day everyone! I would like some help from you since I'm just a beginner in WordPress. I would like to add a submenu under another submenu like this: International China Independent Group ...
0
votes
0answers
52 views

Nav Walker: Set ul id to current item's title

I'm trying to assign an ID to a sub-menu ul that matches the associated items li in my nav-walker. Here's the output I'm looking for: <ul> <li> <a href="menu-item-1" ...
0
votes
1answer
42 views

Custom Post Type Link added to menu won't show in frontend

I have created a custom post type and I want to link directly to some of the posts in the custom post type in my main navigation menu. I can see the posts in the left hand side of the menu page, and ...
0
votes
1answer
30 views

Editor access to menu: custom post type missing

I have used this code; $roleObject = get_role( 'editor' ); if (!$roleObject->has_cap( 'edit_theme_options' ) ) { $roleObject->add_cap( 'edit_theme_options' ); } to add menu access for ...
0
votes
0answers
17 views

Custom Link Not Registered as Nav Menu Parent

My issue is that I have a horizontal menu, with a few hashed - '#' - custom menu links to prevent users from going to empty pages (the main categories were just made pages for the link structure). ...
0
votes
2answers
26 views

Is It Possible To A Link To The Homepage From The Admin Sidebar?

The closest I've managed to get is: function redirect_to_local_110(){ wp_redirect("/", 302); exit; } function add_home_link() { add_menu_page( 'Course', 'Course', 'read', 'home', ...
0
votes
0answers
44 views

Showing just the menu toggle next to logo in twenty fourteen

For mobile, I want to eliminate the black menu bar, search box/icon and move the menu toggle up so that on mobile, my site just has the logo and the menu toggle. This gives a bit more room for ...
0
votes
0answers
27 views

Add class to menu

I want to add a css class in menu list with this code: function my_special_nav_class( $classes, $item ) { if ( has_nav_menu( 'socialmedia' ) ) { $classes[] = 'btn-social btn-outline ...
0
votes
1answer
63 views

How do you manage large menu hierarchies in WP?

Has anyone worked on sites where the menu hierarchies is fairly large? Not more than 3 levels deep, but more than 40+ menu items? If you only list first level items in the top menu without dropdowns ...
0
votes
1answer
29 views

Where is the order of a menu saved in the database

I want to use a custom menu from the wordpress database but I get the elements disordered and I want them to have the same order how can i do that? There is a place in the database where the order is ...
2
votes
4answers
425 views

How to stop mobile theme inheriting desktop navigation menu?

UPDATE************ Well I have a working solution, although not ideal. Using the Genesis sandbox child theme which has a mobile nav button built-in, I was able to set that to use the primary nav ...
0
votes
1answer
976 views

Add “Logout” link to navigation menu

How can I add a link to the primary navigation menu with the class="right" attribute? I tried to add a static link to example.com/wp-logout.php?action=logout but that leads to a logout confirmation ...
0
votes
0answers
18 views

Custom generated WordPress menu using get_pages renders the proper HTML but doesn't display all elements

I have created a menu with the hopes of listing all of the child and grandchild pages of a page (see link below) it works great except that it is cutting off the menu at about 15 children pages, most ...
0
votes
1answer
44 views

add custom classes to anchore in wp_nav_menu

i wana add custom class to anchores in wp_nav_menu outputs. default for example is : <li id="menu-item" class="menu-item menu-item-type-custom"> <a ...
0
votes
1answer
54 views

How to make pages metabox display all hierarchy in menu admin?

Running WP 3.9.1 I've got lots of pages and sub pages. When I get to create menu lots of sub pages doesn't display on the right level, but some do? This is how the pages metabox is displayed The ...
0
votes
1answer
51 views

Give a condition to a wordpress menu item to change its offerid for each landing page I create

So my wordpress site has a one header and one footer with a big CTA as one of the menu items. I want to create a bunch of landing pages but I want to be able to change the offerid in the url for each ...
0
votes
1answer
41 views

Show menu only if_page is

I have created 4 menus (submenus) in wordpress. I need to know how show this menus only if pages ids are "10 and 11 for example. Is possible? I'm desperated after two hours... thanks! This is my code ...
0
votes
1answer
14 views

Showing a link with Javascript based on log-in status

<?php if ( is_user_logged_in() ) { echo ''; } else { echo '<a onclick="ppOpen('#login_panel', '800',1)" href=\"javascript:\">Entrar</a>'; } ?> Hello, I'm trying to make this work ...
0
votes
0answers
52 views

Twenty Eleven child theme anchor top menu not clickable

I am working on child twentyeleven theme. I have to do three things to my child theme. 1-Using page.php coping in my child theme.I added the code in page.php at top of the code <?php if ...
-1
votes
1answer
21 views

Why plugin's icon for the menu not found?

Why plugin's icon is not showing in plugin menu ? All code of plugin : add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( 'Site ...
0
votes
0answers
299 views

How to add “data-toggle” to wp_bootstrap_navwalker?

I'm writing one pager for my client. I made Child Theme from Twenty Thirteen. All is made on Bootstrap 3.2.0. I use tabs, accordion. And i also want to use jQuery Smooth Scroll plugin. Unfortunately ...
0
votes
0answers
43 views

Walker Nav Menu - down arrow for top level, but right arrow for below

I'm using Donald Harvey's solution with Custom Walker_Nav_Menu to show an arrow where submenu items belongs. It worked for me in a project where I had a left sidebar vertical menu. But when I'm ...
0
votes
0answers
28 views

Backend menu that shows pages with specific page template and their child pages

I've set up a menu in the backend that shows a list of pages that have a specific page template assigned to them. I've managed to do this using the code below, but I also want to display the child ...
0
votes
0answers
52 views

Alter menu item parent relationships with walker?

An example custom menu structure I would like users to see About Interests - Movies - Toys - Fun Job Hangouts The end result outputted menu ready for dropdownage would be About - Interests - ...
0
votes
0answers
65 views

Add menu/submenu items programmatically

Newbie question here. I'm hoping to modify a menu programmatically and am having trouble figuring out the right way to do it. My site uses a membership plugin. Users pay to become members, and ...