The navigation tag has no wiki summary.
8
votes
3answers
4k views
Programmatically add a Navigation menu and menu items
Through API functions, I want to define a new Navigation menu, select it in the current theme, and then insert a few Pages as menu items. This is to be done for instance on a theme activation.
...
6
votes
1answer
953 views
Using Wordpress to make a “Product Search” type navigation drilldown
This is somewhat of a follow-up to a question I asked some time ago: Trying to design nice category drilldown with one "held" taxonomy and a repeatable list of categories
I've sort of got ...
5
votes
3answers
6k views
wp_nav_menu(), how to change <li> class?
I'm building a menu for my website. The static is looking like this:
<nav>
<ul id="menu">
<li class="item_1"><a href="#">Item 1</a></li>
<li ...
5
votes
2answers
3k views
Wordpress Custom Post Types with a page as a parent?
I have a lot of custom type items in my new WP project, and for navigation reasons, I want to make the parent to some of them a Wordpress page. The problem is that apparently, Wordpress does not let ...
5
votes
1answer
582 views
Use navigation path from menu for permalink
I now switched to permalinks and defined my own structure
/%postname%. If I click on a menu item it takes the path from the parent page (hierarchy defined directly when editing a page).
What I want ...
4
votes
3answers
859 views
How to Get Next or Previous Post in a Specific Tag?
I'm trying to create links to the next and previous posts within a specific tag (on the post page itself), but I can't seem to find a plugin or source that does this.
I want to be able to something ...
4
votes
1answer
471 views
Add custom meta to nav menu items
I need to attach meta data to every menu item, with a key 'foo'. Is it possible to do that, without editing core WP?
A quick look at the nav-menu files showed that no hooks exist near the place I ...
4
votes
3answers
571 views
How to modify the “after” of last element in wp_nav_menu
When using wp_nav_menu how do I make it so 'after' => does not show on the last element of the list?
4
votes
1answer
923 views
Getting the Next and Previous Posts Titles in the Sidebar?
Let's assume that I have the following posts with the following titles:
PostA (is assigned to the 'category 1')
PostX (category 2)
PostB (category 1)
PostC (category 1)
PostD (category 1)
PostY ...
4
votes
2answers
118 views
Call custom field into menu item
I have a navigation menu in Wordpress. I would like it to check if the page has a custom field of "menu_icon" and if it does, add that custom field into the menu item it corresponds to. I'm sure this ...
4
votes
1answer
196 views
Navigate with keyboard in Gallery shortcode
I am using Wordpress Gallery shortcode and I was wondering if there is a way to navigate using the arrow keys? Like if I view an single image and used the right arrow to navigate to the next image in ...
3
votes
1answer
898 views
How to order adjacent posts (prev / next) by custom field value?
I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type.
One of the fields is named lot which is an integer ...
3
votes
1answer
2k views
show current navigation path from menu
I want something like this
Home > Products > Steel > Nails
This information should come from the menu structure! I installed Breadcrumb NavXT but it seems that it only takes the path I defined (this ...
3
votes
2answers
360 views
How to highlight the right item in the navbar
In my site i have a navbar which is created by using the new feature of wordpress 3 - "the menus ".In my site this navbar conatins both categories and pages.
When I'm in a single post / sub-page , ...
3
votes
1answer
149 views
Assign title-specific class to list items in menu based on WP pages
I'm currently using a WP-generated list of pages for my site navigation - this is using the method wp_page_menu.
I'd like to add custom styling to specfic list items in the menu, and I was wondering ...
3
votes
3answers
1k views
Nav menu separators?
Anyone know of a plugin that can, or have an idea how to, allow a user to drop in separators/dividers between certain nav menu items?
Google only seems to bring up rookie CSS tips for first/last ...
3
votes
1answer
401 views
Highlight nav menu terms
OK so i have custom post types and custom taxonomies. I have a sub-menu that is made of the custom taxonomies.
Example:
registered taxonomy: Movies
and
terms: action, adventures, etc. (= menu ...
3
votes
1answer
2k views
Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?
(Moderator's note: The original title was "How can I create a widget area in the navigation bar (Genesis specific)?"(
I'm trying to create a widget area in my navigation bar. I'm attempting to adapt ...
2
votes
4answers
3k views
How to add CSS Class to previous_post_link or get previous/next post link URL
How can I add a CSS Class to the previous_post_link output or just get the URL and create the HTML markup myself
2
votes
2answers
2k views
WP_Query and next_posts_link
I cannot figure out how to make next_posts_link() work within my custom WP_Query. Here is the function:
function artists() {
echo '<div id="artists">';
$args = array( 'post_type' => ...
2
votes
3answers
3k views
Pagination with custom SQL query
I have my own SQL string to select Custom Post Type posts with specific WHERE clause. I've used the offset and limit to return appropriate posts depending on a page being displayed. That's working ...
2
votes
7answers
5k views
Display navigation menu item conditionally based on user capabilities
I have one "branch" of my main site's navigation tree that should only be accessible to a set of registered, logged-in users. I understand how to query a user's role and capabilities. This question is ...
2
votes
2answers
2k views
wp_nav_menu doesn't generate parent/ancestor classes
I don't know why the proper classes for menu item are not generated - all the elements in the tree which has subtree get only menu-item menu-item-type-post_type. The elements, which don't have ...
2
votes
3answers
165 views
Can this navigation be done easily in WordPress?
Can anyone please let me know if a dual navigation style is easily achievable or not possible.
A WordPress developer I'm in touch with is telling me it's not.
Basically, we would like the navigation ...
2
votes
4answers
281 views
Making some links generated from the wp_nav-menu function unclickeable?
In this website:
http://alexchen.info/brianfunshine/
I have a navigation menu taken from the twentyten theme. I want to make some links clickeable and some not (some don't have to behave like a ...
2
votes
2answers
3k views
Dynamically exclude menu items from wp_nav_menu
I tried looking for info about how to exclude/remove nav menu items from custom menus, and the only thread I found did not have any answers that were useful to me.
1. Background:
I put together a ...
2
votes
2answers
2k views
What's the easiest way to duplicate an entire navigation menu?
What's the easiest way to duplicate an entire navigation menu? I don't care if it involves SQL commands or whatnot. I just have some really big menus that I'd like to duplicate. Didn't see a plugin to ...
2
votes
1answer
43 views
Test if page is child and has children, if so echo child pages also on grandchild pages
I am trying to show a sub-menu of child-pages only on level 2 pages (who have a parent) and if they have children. I am using the code below (made from several snippets I found), it works fine on ...
2
votes
1answer
213 views
Make compatible custom menu widget for Twitter Bootstrap
If I configure wp_nav_menu function, I can put the "items_wrap" option to achieve a nice navigation given by Twitter Bootstrap, thus: <ul class="nav nav-pills">%3$s</ul>. But, how to ...
2
votes
1answer
282 views
Previous & Next on Index Page broken
So the Next/Previuos on my index page is broken. It goes to page 2 but doesn't refresh the posts. It will work on my categories and it will work on my posts but it just won't work on the from page. ...
2
votes
2answers
3k views
wp_nav_menu: check if the list item has children and add a class to anchor link
I'm trying to add a class to anchor links of children element in wp_nav_menu both for pages and posts.
Is there a way to modify the Nav Menu Walker and do so?
Basically my custom walker looks like ...
2
votes
2answers
378 views
adding .current* tags to custom post types and taxonomies
TwentyTen adds some classes to custom menus, for instance:
#access #menu-item-262.current-menu-item, #access #menu-item-262.current-menu-ancestor
All the top-level links in my primary navigation ...
2
votes
1answer
1k views
BuddyPress - How to add logout in nav menu
How to add a logout option to the main nav menu (not to the top bar) in BuddyPress?
2
votes
1answer
544 views
Highlighting the current page in a navigation menu which links are generated with a custom loop?
This is a second navigation menu I'm using:
<ul id="forums">
<?php $custom_posts = new WP_Query(); ?>
<?php $custom_posts->query('post_type=bbp_forum'); ?>
...
2
votes
3answers
6k views
Using Image Links in Wordpress Navigation Menus Instead Of Text Links
Does wordpress support the capability to use images in the navigation menus instead of text links? I searched for this capability and found a site that shows how to include images in the menu through ...
2
votes
2answers
454 views
How to manually add an item to a submenu in a menu generated by wp_nav_menu?
Hey. I've been trying to figure this out for a long time but can't seem to crack it.
I have created a menu using Wordpress 3 menu editor and it's all fine and working.
But I want to manually add an ...
2
votes
1answer
52 views
How to add a section to the menus configuration, offering hard coded items?
So, let me explain what I'm actually trying to do, maybe there's a better way to achieve it. I'm working on a theme, and I'd like the user to be able to easily position "special" items in the menu ...
2
votes
1answer
65 views
current-menu-item not working with custom post type
I'm a wordpress newbie and I have annoying problem. I have a few custom post types (capability_type=post). Two of them i created with "Custom Post Types" plugin and when i put its categories in ...
2
votes
1answer
223 views
Get the children of the parent category
I'm trying to get all the children categories to display in this loop but I'm struggling with the code. This is what I have so far.
<?php $args=array('orderby' => 'name', 'order' => 'ASC');
...
2
votes
2answers
211 views
Automatically add a page to menu
I write a lot of content on a daily basis, and I have a lot of menus, submenus etc. I don't want to use the menu gui each time I create a new page/article.
Is there any plugin or way of automatically ...
2
votes
3answers
647 views
Hide and show menu subpages
I am sorry if this is not clear, but I am using translated wordpress so I am translating some names back.
I have pages in menu and when I click on some item it goes to that page. But I need f. e. ...
2
votes
1answer
1k views
Not able to get current menu ID
I'm trying to get the current menu item ID. I hve found one thread that has put me on the right track: How to get current-menu-item title as variable?
This is the code I use in my function.php ...
2
votes
2answers
183 views
Showing Custom Content in a Nav Dropdown
I have a custom content type "balloons", and I've assigned a parent category to a "balloon" item, "Water Balloon"
I've made the Balloon category a primary menu item. I want a link to "Water Balloon" ...
2
votes
2answers
484 views
specify meta_key / meta_value condition for prev_post_link and next_post_link
I've got a custom post type (CPT) called event. Every event has got an associated meta_key called event_date.
I want to make sure that events with empty event_date won't appear in my list of all ...
2
votes
3answers
573 views
Trouble with wp_nav_menu, conditional tags and fallback_cb
I created some menus, and now I'm trying to set up a conditional construction with wp_nav_menu in header.php, but the behavior is not really as expected. I'm doing something like
<?php
if ( ...
2
votes
3answers
2k views
Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
I've found this new plugin
http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1
that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the ...
2
votes
0answers
51 views
Wordpress Export Import Site Navigation Menu
When I do an export and import the menus get transferred but I have to set the Site Navigation Menu manualy. Obviously it's only a small detail but can I ask is this a bug or expected behaviour and is ...
2
votes
1answer
152 views
Nav Walker current menu item not displaying
I'm building a theme on top of a starter theme (wp-bootstrap) and am having trouble getting the Nav Walker to show the current menu item. current-menu-item is not there when I use a web inspector on ...
2
votes
0answers
91 views
How to move parent li to end of child ul
I'm working on translating a site from HTML/CSS to Wordpress, and I've come across an issue. In the spirit of keeping the site fully customizable from the dashboard, I've been using Wordpress' default ...
2
votes
1answer
377 views
Page navigation doesn't show when query category
Problem:
when I do www.example.com?cat=4 or choose category through custom menu or from category widget it shows only first page without navigation at the bottom, where it supposed to be. It's the ...
