0
votes
0answers
11 views

Display the nav menu for a particular page id

Say that I have the id of a page that is in the wp_nav_menu() I would like to show the wp_nav_menu() for that particular page. Is that possible? I can use wp_get_nav_menu_items() to get all items for ...
0
votes
1answer
39 views

Remove all nav menu classes except those which begin with certain letters

I'm currently using a function which strips out all the unwanted classes from my nav menus, leaving only the classes I want to keep (the ones listed in the array inside the function). It looks like ...
-1
votes
0answers
11 views

Menu Walker Help Me?

I'm struggling with the development of a menu Walker. I would ride as follows: When the user clicks on a page, to show only page father and daughters and hide the others, example: Sorry my english ...
0
votes
1answer
39 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
0answers
52 views

How to add a code for lastpostdate after/inside a specific menu link?

So, I have a news website. The designers want me to have a link in the menu that says "Latest News - [time of the last post]". I know I can get the datetime of the latest post with ...
1
vote
1answer
182 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
8
votes
1answer
684 views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
1
vote
1answer
122 views

how to put the logo in the center of other items in the navigation bar

I'm developing a website in wordpress and I have to create a navigation bar in which the logo of the website has to be put between items like this: item1 item2 LOGO item3 item4 I'm thinking to use ...
0
votes
1answer
47 views

Custom navigation menu with awsAccordion

I'm making a custom template for my client. Well i'm strangling for hours, for making the vertical accordion menu dynamic so my client can change the nav links etc. The structure of the navigation is ...
4
votes
1answer
225 views

wp_delete_auto_drafts() deletes links in menus

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = ...
0
votes
0answers
76 views

Custom Menu echo own HTML

I've registered a custom menu and got all that set up, however the formatting of the HTML that the menu uses doesn't fit with the CSS/HTML menus I had previously and want to keep. Therefore I was ...
1
vote
2answers
57 views

Detecting classes, adding widgets, and adding divs in with a Nav Walker

I've been trying to figure this out for days, to no avail. A template I'm building requires a mega menu. The markup for the menu looks like this: <nav> <ul> <li><a ...
0
votes
1answer
55 views

how to add a div inside wp_page_menu

Right now I'm using the <?php wp_page_menu('menu_class=nav'); ?> function, which gives this result: <div class="nav"> <ul> <li class="page_item ...
1
vote
1answer
80 views

Logout and redirect using the WP Menu

I have a navigation hyperlink in my secondary menu, that will allow the user to logout: However, the user is prompted with the following screen for confirmation, when clicking on the hyperlink in ...
0
votes
1answer
80 views

Add login hyperlink to secondary navigation menu

I have the following lines of code in my functions.php file: #-----------------------------------------------------------------# # Custom menu ...
0
votes
1answer
76 views

How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?

I have the following problem developing a WordPress theme and I am here to ask you if this solution could be a good solution or if exist some better way to do. I have a custom WP theme and into this ...
0
votes
1answer
58 views

How to change menu order item

Hello I have a main menu in my website Home | How to start | about | contact | categories but I add one item that lists all categories in functions.php add_filter('wp_nav_menu_items', ...
1
vote
1answer
53 views

Remove all nav menu classes ( but keep useful ones… )

I'm trying to remove all menu-item classes (except for .current-menu-{item/parent/ancestor} and .menu-item-has-children) function custom_nav_menu_css_class($classes) { $classes = ...
0
votes
0answers
69 views

Customizing Walker_Nav_Menu - Trunicating spaces

I've just started learning to code WP themes pretty much from scratch and I'm trying to figure out how to pass a variable thru a customized Walker_Nav_Menu but without any ascii spaces. The goal is ...
0
votes
0answers
171 views

Add the “.current-menu-item” class to <a> tag?

I am changing wp_nav_menu() to make it a listless navigation menu (i.e., no unordered list or list item tags) Normally the menu <li> has the .current-menu-item class attached to it when active. ...
0
votes
1answer
56 views

Why in this WordPress theme I can't see the Main Menu?

I am pretty new in WP (I came from Joomla) and I have the following problem. I have installed WordPress on my server and if I use one of the included theme (such as the Twenty Thirteen theme) when I ...
0
votes
1answer
174 views

Show login greeting above sub-menu links?

I'm using WordPress' built-in menu system to output my Main Menu Structure. I have one sub-menu, and it has two links currently, "Tracking" and "To-Do List". I want the following login greeting to ...
0
votes
0answers
47 views

How to display menu description, but only if there is a sub menu?

Today I've written my own custom menu walker. While I am a bit shocked how difficult this is (also because there seem to be some bugs in Wordpress), I am astonished that I could make everything work. ...
0
votes
0answers
45 views

add metabox to specific custom plugin page

Hello I am new to WordPress and I am creating a custom plugin called ZeeFields. Now i wanna add a meta box to my custom plugin page. I tried but still i cant get it to work. btw I can add meta box to ...
0
votes
1answer
105 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
0answers
65 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
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 ...
0
votes
2answers
992 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
3answers
108 views

How can I add a class to a single menu item?

I'm trying to modify a non-WP theme to be compatible with my newest WP project, and one of the issues is a drop-down menu item. Since it's a totally custom theme, I want to replicate the behavior of ...
0
votes
1answer
106 views

learning OOP with wordpress plugin

I used to develop in functional design so far and I am now learning OOP. I stumbled upon following problem. Sometimes in OOP a function needs to send and argument as an array. Example. I want to ...
1
vote
2answers
38 views

Menu Limitations

I am coming here for advice mainly, because I am stuck on what to do next. Within my latest project, I am using Wordpress at the backbone, as a fully fledged CMS system. I have styled every single ...
0
votes
1answer
47 views

conditional: if is page, and all subpages

What I'm currently trying to achieve is displaying certain menus on certain pages using one template and conditional statements, like so: if (is_page('donate')){ wp_nav_menu(array( 'menu' ...
0
votes
1answer
228 views

wp nav menu: show submenu below li item

I'm trying to figure out if it's possible to show the submenu's outside of the relevant li tag. For example, this php: wp_nav_menu(array( 'menu' => 'side', 'container' => false, ...
0
votes
1answer
4k views

wp nav menu: add attributes to menu items [duplicate]

I'm trying to figure out if it's possible to attach an attribute to a wp nav menu item. To demonstrate, this php: <?php wp_nav_menu(array( 'menu' => 'main', 'container' => ...
0
votes
1answer
23 views

How to tell if a user has gone in and created a menu

By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu. I don't want this to ...
0
votes
0answers
41 views

Getting recent posts corresponding to category items in custom menu

I'm trying to create a tabbed navigation, each tab containing 5 recent post excerpts of category items that are listed in a custom menu. I'm planning to load all these posts at once and put each ...
1
vote
1answer
2k views

Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page

I am working with custom post types and I had trouble with the nav menu not getting the .current-menu-item on my custom post archive page menu item. In fact, when I was on that page or any of the ...
0
votes
0answers
43 views

WP_Nav Highlight Parent Issue

I'm trying to figure out how to highlight the parent nav of a page and becoming stuck. I've seen something like this : <li <?php if(is_page('services')) { echo 'class="current_page_item"'; } ...
2
votes
1answer
73 views

selected menu item

The template I'm working on for a client has the following pages: Home : a custom static page that displays the content of a certain WP page, and the latest sticky posts. This is the front-page.php ...
1
vote
1answer
346 views

How to remove a metabox from menu editor page?

I am not sure if it is much different for any page but I am wondering how to remove a metabox from the appearance>menu page without having to go into the wordpress core files and remove it. Is there ...
0
votes
0answers
61 views

Wordpress adding in site URL to header links

A little information: I am developing a one page theme that uses posts as sections on the main page. I have created code that allows users to add a menu item in the post page from a meta box when they ...
3
votes
1answer
2k views

Menu Items Disappearing

I'm running WP 3.5.1 and I've a menu with about 100 items. When I add new items to the menu older ones disappear. I'm not running Suhosin or similar stuff. What can be the cause? Note: I'm on a ...
2
votes
1answer
278 views

wordpress custom post type remove duplicate menu item

I've registered a new content type with following - register_post_type('news', array( 'labels' => array( 'name' => __( 'News'), 'singular_name' => __( 'News'), ...
0
votes
1answer
312 views

How to display conditional-content if wp_nav_menu( $args ) retruns something

I have a sidebar that displays child links of the current page (using this solotuin by http://wordpress.stackexchange.com/a/2809/27414) which works perfectly. If there is child links to be displayed ...
-1
votes
2answers
109 views

Wordpress menu links with images & class selection

<ul> <li class="selected">Link 1<img src="images/slash.png" /></li> <li>Link 2<img src="images/slash.png" /></li> <li>Link ...
0
votes
1answer
282 views

How to change the menu color

I need to change the menu color of the wordpress 2011 theme to transparent. this is the header <nav id="access" role="navigation"> <h3 class="assistive-text"><?php _e( ...
0
votes
1answer
91 views

Can't remove menu items added by plugin

I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just ...
0
votes
1answer
80 views

Dynamic Menu drops pages?

I've created a Dynamic Menu that highlights the selected page and colors for example the blog page "red" while the other links (home, about, contanct) remain white. My question is how can I make the ...
2
votes
2answers
1k views

Hide main div if wp_nav_menu is empty

I want to hide the div class "navmain2" if the menu is empty. See code below: <!-- Start main navigation --> <div class="navmain2"> <div id="logo"></div> ...
1
vote
2answers
1k views

How can I Add a variable PHP in the Menu Nav

I want to add a variable in the Menu, for passing a value in all my page. The purpose is to retrieve a value for transport to another web site (from my website links) to the tracking, this value ...