A structure with links used to help you navigate from page to page.

learn more… | top users | synonyms

1
vote
1answer
462 views

Get only the path from a function like previous_post_link

I want to use something like previous_post_link('%link','',TRUE ) and put the path into a javascript variable. So using something like var previous = "<?php previous_post_link( '%link','',TRUE );...
1
vote
1answer
2k views

Add an extra field to the navigation menu box?

Goal: I like to use a subtitle in the navigation bar. The most logic location, in my opinion, would be Appearance > Menu and add a field below navigation label called subtitle. So the end user can ...
1
vote
1answer
5k views

Remove li from wp_nav_menu

How can I remove the li from wp_nav_menu? I know I can remove ul but is it also possible to remove the li? I would want to do this on just one menu not all the menus on my site.
1
vote
4answers
952 views

Show nav link highlighted

OK so i have a main menu and a sub-menu How can i make a menu item active when viewing a single post. The sub-menu uses taxonomies so i know i need to make the taxonomy active when one of the posts ...
1
vote
2answers
2k views

How to insert custom code into wp_nav_menu structure?

I was able to use <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => false ) ); ?> to create the menu within my theme. Messed around with 'items_wrap' but couldn'...
1
vote
2answers
47 views

How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()

I want to add custom classes to my menu items. For every subpage I show its siblings as a navigation: global $post; if ( is_page() && $post->post_parent ) { $...
1
vote
1answer
130 views

Replace menu permalink/hyperlink with only menu name/slug

I don't know if i am asking this correctly, but i will try. I am doing this for history pushstate purpose. Code to get menu wihout ul and li: $topmenu= array( 'container' => false, '...
1
vote
1answer
662 views

wp_nav_menu add some element to container

I've tried to hook wp_nav_menu_args to get an ID for the nav menu. I tried to add an element using javascript to container menu. But I never get the ID for the menu. How can I add an element to a nav ...
1
vote
2answers
1k 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
1answer
1k views

Menu fallback “menu_class” rendering a “div” instead of a “ul”

I'm working on a fallback menu for a WordPress theme I'm working on. The main menu's menu_class renders a ul which is what I want. However, if I use the menu fallback, the menu_class renders a div ...
1
vote
2answers
2k views

Adding different classes to anchor in navigation menu

Is this possible? I want to add different classes to the anchors, so not the same on all anchors. How can I do this? PS: I am using this: function add_nav_class($output) { $output= ...
1
vote
3answers
5k views

Search box as a menu item in the nav menu output by wp_nav_menu?

I am using the Twenty Twelve theme, and the following is the code it uses to register and display the menu. In functions.php: function twentytwelve_setup() { ... // This theme uses ...
1
vote
1answer
8k views

wp_get_nav_menu_items how to exclude sub level menu items?

I have the following function to output a custom menu in select format for a responsive design I'm working on. It's working exactly how I want it to apart from I would need to exclude sub menu items. ...
1
vote
2answers
30 views

How to remove background image from post navigation elements?

I am using a theme which shows the featured image as background image in post navigation elements (next and previous links on a single post). But I want to remove these background images. Here is ...
1
vote
1answer
53 views

Twenty Fifteen: Adjacent posts by menu_order [duplicate]

I'm using the Twenty Fifteen (child) Theme and want to display the previous / next post links with the background image for my hierarchical custom post type. It is being displayed, unfortunately the ...
1
vote
1answer
67 views

get_query_var('post_type') not returning in a filter

Trying to highlight custom taxonomy pages in the main nav, so I am trying to get the post_type of the current rendered page (to compare to the menu item): add_filter('nav_menu_css_class', '...
1
vote
1answer
58 views

How can I put two menus in the same div?

I'm converting an html5 site into a wordpress theme, but have got stuck with my menus! this is the html version: And this is my result so far in wordpress: as you can see I can't get the social ...
1
vote
1answer
373 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 ...
1
vote
1answer
467 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 ...
1
vote
2answers
195 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
99 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> &...
1
vote
1answer
340 views

Link to previous month's posts

On my homepage I am showing only the current month's posts. I'd like to include a link to the previous month's posts at the bottom of the page. Wordpress has get_month_link (http://codex.wordpress....
1
vote
2answers
341 views

Restrict post navigation to current sub menu

This is what I'm using to output my post navigation: <?php if (is_single() ) { ?> <nav class="post-navigation"> <h1 class="visuallyhidden">Post Navigation</h1> <ul&...
1
vote
1answer
128 views

Custom Post Type Navigation on Custom Field

I'm working on a Custom Post Type sorted on a Custom Field. No problem when I list out the posts. But when I go to the single post page for one of these, I want the Prev and Next navigation links to ...
1
vote
2answers
222 views

Two Search pages, One search form

I have a search form that I want to place in multiple pages (it will be in different header types) I do this by using the 'get search form' function. On my Search form I have radio sections listing ...
1
vote
1answer
207 views

Get admin menu link

Is there any way I can get the menu link for admins? http://codex.wordpress.org/Function_Reference/edit_post_link Similarly to the edit_post_link() that returns the edit link for loggedin Admins I ...
1
vote
1answer
604 views

Breadcrumbs - Exclude Child Categories

I am using this code in my functions.php file to display breadcrumbs on my web site.. function the_breadcrumb() { if (!is_home()) { echo '<a href="'; ...
1
vote
1answer
992 views

Nav menu of all posts in a custom post type

How can I create a nav like those generated by wp_nav_menu which lists all the posts in a specific custom post type? For example, I have CPT "section1" and I'd like to have the menu list all posts ...
1
vote
1answer
652 views

Is there a wordpress plugin enabling an autocomplete search box, then jump to page?

I have very little experience with WordPress. I am exploring it as a potential solution for our needs. I would like to implement an autocomplete search box (a bit like jQuery's) where users could ...
1
vote
2answers
358 views

wp_nav_menu including Skype URL

If I try to add a skype username as the URL for a wp_nav_menu item, the item is saved but the URL is not. The username URL is in the following format: skype:example?call Any thoughts on add skype: ...
1
vote
2answers
1k views

Open subcategories in submenu on click in primary menu

I am figuring out a way if we can manage the menu in such a way that when I click on the menu item in the first menu, the sub categories or links that i choose should be displayed in the secondary ...
1
vote
1answer
663 views

Arguments ignored/markup changed in wp_nav_menu if no menu is selected

I've created a menu using wp_nav_menu in my theme using the most simple setup as possible: wp_nav_menu( array( 'theme_location' => 'my_theme_top_menu') ); And in my functions.php: ...
1
vote
1answer
835 views

posts_nav_link on single.php

The situation...I use 3 categories. One of them is called 'News'. This page shows on the left the latest post in the category 'News' and on the left it shows the 10 most recent posts from this same ...
1
vote
1answer
121 views

I need ideas for a complicated menu

I have a slightly complicated menu to code from PSD document and integrate into wordpress. this is how it looks: (link in the comment bellow) The result of my work is this: http://slavisaperisic....
1
vote
1answer
722 views

Replacing WordPress menu functionality with a plugin

I asked this earlier on StackOverflow.com before realizing there was a StackExchange specifically for WordPress. Here is the link to the old question (for moderator deletion): http://stackoverflow....
1
vote
1answer
3k views

Find out if a page has no parent

Hay, have a basic menu looking like this Item 1 Item 1.1 Item 1.1.1 Item 1.1.2 Item 1.2 Item 2 Item 2.1 I'm outputting this as a list using WordPresses "wp_list_pages()" ...
1
vote
1answer
267 views

How to get back to same page of post-list - after updating a post

I'm going back and reworking categories and tags on some older posts. So I'm going back in time, to say for example page 4 of my posts. I know there are search filters, which might help, but let's ...
1
vote
3answers
338 views

How to remove some specfic navigation links only from selected page/pages?

For example: In the client site I have 5 page 1) Home 2) product 3) Services 4) Contact us 5) Blog Only from the blog page I want to remove 2) product and 3) Services but not from other pages. Is ...
1
vote
1answer
29 views

Custom Static Links For Specific Menu Right Before/Next The wp_nav_menu Function now working

I am trying to add custom links next/before my built in menu, specifically for main_menu. I have placed this in my functions.php and have given list-items in nav-menu-after.php and also in the before ...
1
vote
1answer
20 views

Wordpress is adding margins and padding to my custom menu?

I've installed wordpress on my computer so I can learn how to make custom themes and test them locally. Currently I'm playing around with some pre-made code from a tutorial so I can get more familiar ...
1
vote
1answer
31 views

I am facing a problem with the navigation menu of my website

The link to my website is http://ashevilleandbeyond.com/ and when you load it on your browser, for a few initial loading seconds, you will notice that the menu items are visible at the top left side ...
1
vote
1answer
28 views

Custom theme navigation

I am creating a theme from scratch and have a problem to understand how to link the pages in the navigation. The pages are written in plain html. And I have "About me", "Contacts", "Blog", etc... ...
1
vote
1answer
66 views

Prepend to start of WordPress nav loop

I am trying to add some markup before the <ul> tag of a WordPress menu using a custom Walker, which extends Walker_Nav_Menu, however I can't get any of my custom markup displaying on the front-...
1
vote
3answers
497 views

Get only <ul> or <li> from the wp_nav_menu

I have tried several options like setting 'container' => false and registering the theme_location and searching on forums but I am unable to get rid of the "div" coming with the wp_nav_menu in my ...
1
vote
1answer
51 views

How to add show/hide in navigation setting for pages

I'd like to add a checkbox for each page's edit page that decides whether or not that page shows up in navigation. How can I achieve something like that in WordPress? Thank you!
1
vote
1answer
76 views

Programmatically (PHP) get the nr. of items in the primary navigation menu

I need to get the nr. of items in the primary navigation menu. I need this to determine the width in percentage of each list item. So I also need to change/add to the css width attribute of the list ...
1
vote
2answers
329 views

Is it possible to nest get_previous_post()?

I am trying to retrieve the previous and the 2nd previous posts' featured image as well as the two next posts' featured image. <div id="cooler-nav" class="navigation row"> <?php $prevPost = ...
1
vote
1answer
387 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 ...
1
vote
1answer
484 views

Setting a Default 'Theme Location' When Creating a Menu

I'm trying to create a theme which when activated, sets up a primary navigation, adds the homepage to it and then enables it in the correct location. Here's what I've got so far: register_nav_menu('...
1
vote
1answer
458 views

Home Custom Menu Link not Working

I'm trying to have the menu link per default when using my custom menus, and in my functions.php document I have this: function home_page_menu_args( $args ) { $args['show_home'] = true; ...