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
2answers
782 views

Display posts from Custom Post Type in category page on front-end

I created my Custom Post Type (bizdirectory), created a new post (Test Business) and created a new category (Business Directory). But if I add the Business Directory category (slug = business) to my ...
0
votes
0answers
18 views

Inserting another menu from inside an existing menu

I ran into the dreaded php input limit but for some reason my host doesn't respect the php.ini or other settings. My only alternative is adding another custom menu from within a menu. Don't ask why ...
1
vote
0answers
176 views

Wordpress menu performance is slow when lot of items

I have a menu with more than 100 items in total and it is very slow to manage all those, slow respond and slow saving. Is there any plugin to somehow improve performance and make my life easier in a ...
0
votes
0answers
56 views

Change archive link to single post

i do menu with this code but links redirect me too archive.php <ul id="nav"> <?php $all_posts = get_posts(array( 'posts_per_page' => -1 // to show all posts )); // ...
0
votes
1answer
26 views

Navigational error

Basically I have an image for a header and I changed the link behind that to go to the main website and was planning on making a news option in the menu to link to the blogs main page, after changing ...
0
votes
1answer
88 views

Category archive in menu

I am looking for a solution to show the archives for a specific category in my main menu. The first level menu entry would show the label of the category, say "News Digest", without linking to ...
0
votes
2answers
317 views

wp_nav_menu does not take arguments?

I am sorry for this nooby question, but I just don't get it : I was working with the function reference for wp_nav_menu and this is my line of code: <?php wp_nav_menu( array('theme_location' ...
0
votes
3answers
559 views

How to customize navigation menu?

I'm new to Wordpress and I've tried wp_nav_menu function. If i get it right it is a standard way to show you navigation menu created with help of the Menu Manager. What is bothering me is the fact ...
0
votes
0answers
28 views

Strict Standards: Declaration of … should be compatible with [duplicate]

I try this answer, and i changed the function start_el(&$output, $item, $depth = 0, $args = array() ) { but it did not work. The problem is, I have this theme, link here. and I'm getting this ...
1
vote
0answers
141 views

Bootstrap Dropdown Menu unresponsive in mobile [closed]

I have built a responsive website using Bootstrap Theme the menu is working fine in desktop, but if I tap the menu button in mobile devices, more often unresponsive and the transition is delay. Any ...
0
votes
2answers
2k views

How to display the title for each menu item in a span attribute

I'm trying to add a CSS hover effect to my theme's main menu and the effect is based on an attribute passed in a <span> element. The problem is that I am unable to produce this dynamically with ...
0
votes
1answer
235 views

“Widgets” menu doesn't appear

I'm developing a WordPress theme, which works great on my localhost and one of my live servers, but on my other live server the Widgets menu (from Appearance) doesn't appear. And yes, all 3 servers ...
0
votes
2answers
603 views

how to add Custom menu item like User name in Header Menu only

I am new to Wordpress I am setting up wordpress Site which has 3 Menus Top menu Header Menu Footer Menu My issue is I need to add the User name to My Top menu Only when User is Logged in But ...
2
votes
1answer
35 views

WordPress – site with 2 stylesheets and more…

I’m building a site that is broken up into two views (or sections): College and Corporate. » See it here When the College tab is active, the site will use college-styles.css (orange background) ...
0
votes
1answer
148 views

Switching to child theme breaks menu names

When I switch to the child theme I am working on, the main menu uses the page names instead of the names that I gave it in the Appearance > Menu options. Happened to anyone else?
0
votes
1answer
22 views

Right way for setting categories

My site follows this hierarchy HTML5 + Themes Resources Books Tools Wordpress + Plugins Themes Tools Books jQuery + Plugins Tools books and the same combinations for CSS3, SEO and others, ...
0
votes
0answers
274 views

Remove <ul> from wp_nav_menu() wordpress

I am using the theme Twenty Thirteen and am using wp_nav_menu() to display menu items. I need to remove the container <div> and <ul> from wp_nav_menu(). I tried this: wp_nav_menu( array( ...
0
votes
0answers
84 views

No Current Class showing in Menu for Custom Post Types

I have Created Custom Post Types "NightLife" "Event" "DLStore" I have added them to Secondary Nav Menu. They show up but when i select the page it does not show any active/current class unlike other ...
0
votes
1answer
15 views

Expected snippet value not showing

I have a code snippet like this one, <div class="container"> <ul id="menu"> <li> <a> <i ...
0
votes
1answer
134 views

Update body class based on menu

I'm trying to add a class to the body tag based on whether current menu items either have children, or are children. The custom menu was added via wp_nav_menu. I have hooked into ...
0
votes
1answer
135 views

Remove submenu item from list

I have the following script within my functions.php file to avoid certain users from modifying things they shouldn't and would like to remove one more item, the Appearances > Themes submenu. function ...
0
votes
1answer
27 views

Wordpress always display the first menu

I try to display multiple menus but Wordpress keep always display the first one I created... Here is all the code about the menus: functions.php <?php function custom_init(){ ...
3
votes
1answer
711 views

Keeping parent menu items active in child pages

I'm a begginer in php and css. I would like to know how to keep an top-menu item underlined while navigating on child pages. Here is my layout: I have a navigation menu, listing all my parent pages ...
0
votes
0answers
75 views

How to get the count for each taxonomy term

I know it is $term[0]->count; However, my terms are placed in the custom menu plugin. My terms are currently structured as Parent Child Parent Child How do I append the term count of each ...
0
votes
0answers
194 views

wp_get_nav_menu_items() returns an empty array under tags archive

I have three nav menus and for some reason under tags archive wp_get_nav_menu_items('MenuName') returns an empty array. Frontpage, posts, pages are OK, but when you go into tags archive, no items ...
0
votes
0answers
212 views

Vertical dropdown menus

I am working on converting an HTML/CSS template to a WP theme on my local machine. I am unable to add vertical drop down sub-menus to the main menu in the theme. The HTML for the menu is: <div ...
-2
votes
1answer
197 views

Is it possible to add a superscript trademark symbol to a menu?

Is it possible to add a superscript trademark symbol to a WordPress menu?
0
votes
2answers
3k views

styling wp_nav_menu - horizontal, sub-menu drop downs

live site. I'm using wp_nav_menu called "blog-nav". It's displaying ok, however I'd like to have it horizontally oriented and with sub-menu drop downs(all lower cased items should be in the drop down ...
0
votes
0answers
43 views

How to add a menu to wp admin area?

I'm looking for a way to add a menu to wordpress admin area,so admin can publish and edit posts on a specific category through this menu(just like POSTS menu we already have inside wp admin). This ...
1
vote
2answers
1k views

WordPress get or set active menu class

How to get active menu class in wordpress, I want to get it in one plugin to change menu style. Just to clear, I do not want active menu element class. <ul id="menu-scroll" class="nav-menu"> ...
0
votes
0answers
44 views

WordPress Menu Targeting

Okay so I'm building out a plugin that generates a list from the $menu and possibly $submenu. I want to loop through that array and generate that list by the menu_slug, but I cannot seem to figure out ...
2
votes
1answer
4k views

Add class to active element and its parent in nav menu

I am using the following code in order to add a class name "active" to the current menu item: add_filter('nav_menu_css_class', 'add_active_class', 10, 2 ); function add_active_class($classes, $item) ...
-1
votes
1answer
77 views

How To Conditionally Change Menu In Same Theme Location

Is it possible to change to a different menu using conditional tags but using the same theme location? I have 2 menu's created which I want to display conditionally in the same them location which is ...
0
votes
2answers
2k views

Show children (sub-navigation) of active menu item only

So I've searched the net and attempted to code a custom walker class that will do this, but I'm new to WordPress and although similar questions exist none fit exactly what I'm looking for, or suggest ...
3
votes
1answer
330 views

Make Theme automatically choose default nav menu

I have been developing a WordPress theme. I want to be able to, once activated, look to see if there is already a menu created in the backend. If it exists then choose it and use as the primary menu, ...
0
votes
1answer
60 views

Add Protocol to Custom Menus

I've been using tel: links in Custom Menus combined with Responsive Design to add a "Call Now" button to my themes for smartphones. It's been working well. A client just asked me to also add a "Send ...
0
votes
1answer
315 views

Plugin admin list pages as submenu

I am creating a plugin for a custom admin menu based in the admin area. My wordpress template is consisted of 5 pages with different templates and some custom variables that the end user would be ...
0
votes
2answers
328 views

Hide page link in main menu from anonymous users

The title pretty much explains itself, I'm looking for a way/plugin to hide the menu link to a specific page from users that aren't logged in.
3
votes
2answers
146 views

How does a minimal menu walker look like?

According to the docs of wp_nav_menu we can specify our own walker function. They suggest to copy the default one and modify it as needed. But to be honest, it is a bit too complicated for the to ...
0
votes
0answers
215 views

Additional class for.sub-menu UL?

This code returns my WordPress menu: <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'header-menu') ); ?> What's the easiest (non-JS) way of adding additional ...
0
votes
2answers
239 views

Use another menu when logged in

Before the update to WP 3.6 I could add this code in the header.php of the theme, which made it possible to have another menu when logged in: <?php if( is_user_logged_in() ) { ...
0
votes
1answer
114 views

Wp Nav Menu div containers

Hi I'm wanting to create a custom navigation menu that will require creating div containers to hold the SUB-MENU set. In other words I want to do this: <ul class="left_menu"> <li ...
0
votes
1answer
51 views

Active menu also for single array

For our (new) website I figured out how to make menu's active. The only problem is that I want multiple pages, singles and categories under one active menu (just to remind people in what section they ...
0
votes
1answer
1k views

Use WordPresss menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...
0
votes
2answers
79 views

How can template identify what page it's being used on?

I have a template that is used for many different sections of my site (About, News, etc.). The nav bar needs to show a little graphic arrow below the section you're in. I was passing this via the ...
0
votes
0answers
153 views

load wp_menu dynamically with enquire.js

I'm trying to dynamically load the wp_menu with enquire.js but it just doesn't work. If the screen is < 1080px the wp_menu(mobile) should be loaded, otherwise the wp_menu(desktop). In my ...
0
votes
2answers
1k views

items_wrap not working

I registered a wordpress menu this way: function nothing_register_menus() { register_nav_menu('header-menu',__( 'Header Menu' )); } add_action( 'init', 'nothing_register_menus' ); I am calling ...
0
votes
2answers
330 views

Remove/Hide a Widget on a Custom Template

i want to make a custom template using Genesis.. I added a custom Menu just by adding a widget on WIDGETS section and placed it on the top right side of the page. But i want it to be removed in a ...
0
votes
1answer
502 views

How to get Menu Navigation Labels to output HTML

I'm trying to follow Jason Bradley's advice on how to style my Wordpress menus. Specifically, I want to insert an icon before my navigation items using Font-Awesome. I tried putting this code in the ...
0
votes
2answers
169 views

Display pictures instead of text in menus

I am working on a custom theme. In that theme, I am creating a menu called "social" for links to the social sites, such as twitter, facebook, ...etc. Now, Instead of text, I would like to display ...