The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
1answer
112 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
41 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
125 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
36 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
434 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
76 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
62 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
66 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
87 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
34 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
37 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
89 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
40 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
70 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
81 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
29 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
81 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
157 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
176 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
332 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
358 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
159 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
19 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
449 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
122 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
253 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
174 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
102 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
27 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
109 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
50 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
113 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
20 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
81 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
203 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
163 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
1answer
153 views

Is wp3.8 / twenty fourteen's Sticky Nav & Responsive - core or theme based

I want to have a twenty fourteen like sticky nav & responsive menu button, in my Genisis 2.0 theme. Before I go to figure this out, is it somehow now native to 3.8 or is it theme dependant. ...
0
votes
0answers
117 views

Programmatically Split A Post Into Multiple Pages

We all know that when you're creating a standard post in WordPress you can split the post into multiple pages by adding this code into the text body: <!--nextpage--> Is it possible to split a ...
0
votes
0answers
36 views

Adding nav menu name from plugin options dynamically

I have added my custom nav menu by this way. function add_last_nav_item($items) { return $items .= '<li><a class="imagesDiv-link" href="#">More</a></li>'; } ...
0
votes
0answers
127 views

Image URL only for custom navigation walker (walker_nav_menu)

I'm attempting to build a custom navigation walker that pulls a page's Featured Image into the page's menu item. I intend to use the Featured Image as a background for the menu item (which is prettier ...
0
votes
0answers
519 views

Foundation 5 Dropdown Top Bar not working in WordPress

I made a 'first version' of a site with help of foundation 5. Now I'm trying to convert it to a WordPress (3.8) template. Most problems have been easily solved, but I can't get the Top Bar to work. ...
0
votes
0answers
20 views

disable menu theme

How can I not display navigation menu in wordpress! I want to display navigation menus based upon the language user has selected. but there primary navigation is always being displayed! How can I ...
0
votes
1answer
73 views

how to hide home nav link in wordpress

I'm trying to hide the home navigation link from the theme boilerplate that I downloaded from underscores.me. Wordpress codex says that its not shown by default, but whether I do this: <?php ...
0
votes
1answer
39 views

Setting Up “Split Site” Navigation in Wordpress

I'm currently attempting to set up a WordPress install for an organization which has two separate devisions. I'm having a very hard time wrapping my mind around how to create two navigation menus and ...
2
votes
0answers
247 views

Add data-icon input to Wordpress custom menu links

I need to add a data-icon="" input to my Wordpress Custom Menu input box thing. This is so I can use an icon font and type the code in for a specific icon and in the CSS use pseudo elements to match ...
0
votes
1answer
71 views

How to accomplish a child page navigation?

I'm not finding any info on this, so I'm probably wording it incorrectly in my search. So I'm hoping someone can point me in the right direction. I have 50 pieces of content that'll be going on my ...