The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
52 views

Use wp_nav_menu to display ALL pages

I am currently building a wordpress theme. For the menu, I just want to display all the pages that are created in the order that they are created in (i.e. I don't want users to have to go into the ...
0
votes
1answer
895 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. ...
0
votes
0answers
99 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 ...
0
votes
1answer
165 views

Next/previous a-like single navigation

I have on the site navigation menu which uses next/previous functionality to navigate through the site. Currently it is a hard coded image map with related links on each page. I know how to get ...
0
votes
0answers
23 views

Output only the 3rd level of menu

Currently I use wp_nav_menu to output the first and second level of the menu in the header of the page. However the menus have more depth than that and I need the third level to be shown at a ...
0
votes
2answers
73 views

How to get main menu only with wp_nav_menu

I have created one menu and have some sub-menu but I don't want to display any sub-menu from my template. My Menu code: <?php wp_nav_menu( array('menu' => 'header-uk', 'menu_id' => 'nav', ...
1
vote
2answers
63 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 ...
1
vote
1answer
125 views

Set if condition with wp_nav_menu

I have created one new menu and add bellow code in footer.php to display my menu wp_nav_menu( array('menu' => 'footer-cn', 'menu_id' => 'nav', 'menu_class' => 'ft-nav' )); Currently I did ...
0
votes
1answer
38 views

nav_menu: how to force a subpage switching on the parent menu

I've been using the native wp_nav_menu to output my navigational elements. I have also created a subpage that is nested under one of my menu, but when I hit that URL the default custom walker clearly ...
0
votes
0answers
58 views

Main menu not appearing on category pages

Im creating a theme based on blankslate/Bootstrap and having an issue with the main nav appearing on category pages (seems to appear everywhere else ok.). In header.php: <div class="collapse ...
4
votes
1answer
120 views

How make get_next_post() return first post when viewing last one

I need a way to link to the first and the last post (CPT) created. For example, I'm in the last post and if I click in "next" I should go to the first. Now i have this <?php $next_post = ...
0
votes
0answers
42 views

wp_dropdown_nav function to list menu items

Is there a wp_dropdown_nav function to list the menu items in a dropdown the same way as like in wp_dropdown_categories. I need to display a menu when the media size is greater than 480px and ...
0
votes
0answers
12 views

Custom nav walker error [duplicate]

I'm using wordpress 3.9 locally to develop a new theme for my website, however I am getting these errors when trying to use a custom nav walker function: Strict Standards: Declaration of ...
0
votes
0answers
28 views

Adding new menu items with wp_nav_menu_items

I am trying to add menu items dynamically using the wp_nav_menu_items filter. What I am doing is working fine on two of my menus but I cannot make it work for the third. Code to register the menus: ...
1
vote
1answer
138 views

How to get correct URLs in network wide menu (Multisite)?

I'm using this function to switch to my main website's navigation and display it on all sub sites in my multisite network. Ideally the links should have the following format: ...
1
vote
0answers
37 views

Walker_Nav_menu access parent menu name

I extended Walker_Nav_Menu with the code below and I would like to replace [TITLE HERE] with the name of the parent menu... In my menu I only display one depth of the navigation at a time. So I would ...
7
votes
2answers
505 views

Filter wp_nav_menu()

I try to split my navigation into 3 single navigation bars (level 1, level 2 and level3+). Three because they're separated over the site and they should only appear depending on the current page. ...
1
vote
0answers
88 views

Rendering of custom walker menu function not working properly

I have a custom function for my nav walker menu that adds custom php/html to it, which can be seen below. It renders a twitter bootstrap dropdown menu that I would like to put my login form in. ...
1
vote
2answers
84 views

Menu styling for last menu item

okay so I'm using the following code to get my links... <?php wp_nav_menu( array('theme_location' => 'primary', 'container' => '', 'menu_class' => 'mainnav') ); ?> This is my CSS for ...
1
vote
0answers
75 views

Custom code for WordPress dynamic menu

Without using plugins, how can I create a custom WordPress navigation menu to produce the following code? <div class="bottom_section_full"> <div class="bottom_section_left ...
0
votes
1answer
93 views

Customize Walker_nav_menu to show posts if item is category

I would like to customize the nav menu walker so that when it encounters a category it automatically makes the 5 most resent posts children of the menu item. Is there a way to dynamically add items ...
0
votes
0answers
36 views

wp_nav_menu() reutrns HTTPS?

We have SSL for our domain. But there's only one page want to use SSL to appear on (https://mydomain.com/secure-page/). All others should be regular http:// pages. So we've set siturl and homeurl both ...
1
vote
0answers
39 views

Can I use multiple nav_walkers?

I am working on a project and I came to the conclusion that I need to use 3 nav walkers: one for edit and 2 for HTML formatting class MY_Walker_Nav_Menu_Edit extends Walker_Nav_Menu {} // this ...
0
votes
1answer
96 views

Auto add pages to primary menu with functions.php

Is it possible to have new pages automatically added to the primary menu via functions.php? This particular theme will be deployed on a special version of multisite, so the checkbox which is ...
1
vote
1answer
41 views

(Bluehost) navigating to the dashboard via mydomain.com/wp-admin/ results in directory listing

I recently had my WordPress blog's domain reassigned as the primary domain on my BlueHost account. The blog is in a sub-folder of public_html/. Below is the contents of the .htaccess file I ...
0
votes
0answers
74 views

get_adjacent_post() function no longer working

I have a theme I'm building using _s (underscores.me). It has several Custom Post Types. _s has a next/prev function built into it that returns links for the next and previous posts if any such posts ...
1
vote
1answer
97 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
0answers
30 views

Navigate with one button through a responsive wordpress page

You can take a look at Tessellate a HTML5 responsive template to see what I'm trying to accomplish. I love this theme and I'm especcialy interested in the way you can navigate with one button to ...
0
votes
1answer
83 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
162 views

Remove nav menu item by script

I want to create my custom nav menu using a script in a wp plugin. I'm almost there using this tutorial. All I need is the option to delete menu entries. something like ...
0
votes
0answers
15 views

Get parent menu item id on submenu ul using start_lvl [duplicate]

I'm struggling with the Walker_Nav_Menu. In the start_lvl function, where I create the <ul> tag holding my submenu, I want to insert the item ID from the parent menu item. I know that I can ...
1
vote
3answers
206 views

Problem excluding category from get_next_post

I have a custom post type called "exhibitions" that uses the native "category" taxonomy. I have three categories: Current, Past, and Featured. Posts get marked either Current or Past and some are also ...
0
votes
1answer
375 views

How to add menu support to a theme?

I tried few tutorials. All i think is i should use register_nav_menus() and then add the menu in header.php Here is the code i tried in functions.php from this help site itself function ...
0
votes
0answers
367 views

Adding CSS Classes to Sub items in Menus is not working

Ok, so this is the code I have to my Mega Menu that works with Bootstrap framework for Wordpress. For some reason, when I enter a class name in the backend of Wordpress > Menus > Sub item > CSS ...
0
votes
0answers
185 views

Adding 3rd level in custom walker

at present my custom walker works great :) but I can for the life of me get a 3rd level to appear... I can get the top level and the 2nd level dropdown to show perfect, but how do I achieve a 3rd ...
0
votes
1answer
21 views

Odd spacing in Navigation Bar [closed]

I am in the process of redesigning my website, and i'm struggling to find what is causing spacing (margins i'm assuming) between navigation items. I have been delving through chrome developer tools ...
0
votes
1answer
532 views

wp_nav_menu not highlighting the current category when viewing a single post

My WordPress site has a bunch of posts, all filed by a top-level category and a bunch of subcategories therein. I have the main site nav rendering the category pages, which, when clicked, get all ...
0
votes
2answers
136 views

Can't get the previous and next posts permalink

I tried to get the next and previous URL, and create a navigation. But it seems to only retrieve the permalink from the two first posts (but not the others recents posts). I have 5 posts (ID = 25, ...
0
votes
0answers
271 views

Bootstrap Scrollspy Incorrect Highlighting

I have a WordPress site that integrates bootstrap scrollspy. Scrollspy is activated when you scroll but it highlights the first two items incorrectly in the navbar. It seems there is an offset problem ...
0
votes
0answers
195 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
104 views

Custom ul class

I need help for my custom Wordpress Layout. It should look like this (HTML): <div class="collapse navbar-collapse navbar-ex1-collapse"> <ul class="nav navbar-nav"> <li> ...
0
votes
2answers
30 views

Menu not always using correct link

I moved a Wordpress install from /wordpress/ folder to root by just copying the index and .htaccess file to root and then updating the permalinks etc. All works fine but I have a problem with the ...
1
vote
2answers
119 views

Set the active Navigation Menu from a plugin

Is there a way to set the following option from a WordPress plugin, if you know the name of the menu you want to set: My developer says it's not possible, but I am sure on of you gurus knows a way ...
1
vote
2answers
51 views

Check if menu id = $specific_id - then insert specific <img>

I currently have a menu structure as followed: <ul class="level-1" id="menu-menu1"> <li id="menu-item-411"> <a href="http://www.link.com">Frontpage</a> </li> ...
0
votes
1answer
115 views

Make next post button link to random post

The normal behavior of this code is move to next post in order by id. Need to change this ascendent order to go instead to a random post (published). <div class="navigation"> <?php ...
0
votes
0answers
21 views

Put captions underneath menu items

Im working on a design and i would like there to be small captions underneath my navigation links like in this image: Image How would i go about doing this in wordpress? Thanks
0
votes
0answers
37 views

Display navigation for the category I just came from when a post is in multiple categories

This is a problem that has plagued me for a while, and I've used various methods to try to get around it. The typical Scenario where I get this problem is: I have a bunch of posts in the standard ...
0
votes
1answer
82 views

HTML-to-WordPress: Dropdown Navigation Menu [closed]

so I've been searching around in the hope somebody also had this issue.. But I can't find any. I've currently created a Wordpress template out of a hardcoded HTML template for somebody. Now here's ...
0
votes
1answer
216 views

Creating a navigation menu of all posts of a custom post type and their children posts?

I have a drop down menu that displays a link (the permalink) to all of the posts of a custom post type (county) and would simply like to display their children too this is the code I have so far but ...
1
vote
1answer
180 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 ...