The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
3k 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' => ...
4
votes
3answers
1k 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 ...
2
votes
2answers
940 views

Strict Standards Error bootstrap navwalker

I am having trouble understanding this error and I've not come across it before, please could someone help? Strict Standards: Declaration of wp_bootstrap_navwalker::start_lvl() should be compatible ...
16
votes
3answers
7k 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. ...
3
votes
1answer
958 views

Determine if a navigation item has children

I am trying to determine if an item has a sub-item with depth 1 or higher. I cannot find anywhere if there is some function/query I can write that grabs the current item looks in the database if it ...
2
votes
2answers
544 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 ...
1
vote
1answer
515 views

Fallback_cb is messing around with containers

I have the following code in place for a custom menu area: $wp_nav_header = array( 'container' => '', 'menu_class' => 'sf-menu', 'fallback_cb' => 'wp_page_menu', ...
0
votes
1answer
1k views

Add custom attributes to menu items without plugin

I'm trying to figure out the best way to add custom menu attributes without using a plugin. I have a site using a custom theme and need to make sure this is setup at theme activation vs needing to ...
0
votes
1answer
946 views

Faceted Navigation in Wordpress

have anyone managed to succesfully implement faceted navigation in wordpress? Using taxonomies and categories I think that it can be done but don't know how to implement the "url" part of faceted ...
4
votes
1answer
801 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 ...
2
votes
3answers
5k 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 ...
1
vote
2answers
1k views

Bar separated navigation by extending Walker_Nav_Menu

I have the following menu in my header: <?php $args = array( 'menu' => 'Main Menu', 'container' => false, 'depth' => 1, 'items_wrap' => ...
3
votes
2answers
5k 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 ...
1
vote
1answer
4k 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. ...
0
votes
1answer
494 views

Two Navigation Menus in Themes Produce the same menus?

Alright so I've got two navigation menus that I've registered with my theme: <?php if ( function_exists('register_sidebar') ) register_sidebar(); add_theme_support( 'menus' ); if ( ...
3
votes
1answer
3k 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
1answer
434 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 ...
1
vote
2answers
3k views

How to style current page menu item when using a walker

I have designed a custom menu and would like to be able to style the individual li dependent whether it is the current page or not? I believe this is normally pretty straightforward using a class such ...
1
vote
2answers
1k views

Dropdown list of a custom post type

I have a custom post type, Doctors, that I need to create a dropdown nav for. I just want it to populate a select list with all the posts of that CPT and navigate to that post on selection. I'm ...
0
votes
1answer
504 views

How to make a plugin auto-add item to nav menu

I'm building a contact information plugin that writes data to a page. So far, so good. What I would like is to build a function into the plugin that adds a navigation item to the main nav bar on the ...
4
votes
1answer
1k 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 ...
4
votes
1answer
1k 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 ...
2
votes
1answer
2k 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
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?
1
vote
6answers
2k views

Prev/Next child navigation for current page?

How can I get a Previous / Next navigation that only navigates the child pages of the current page? By that i mean url.com/page/child1, url.com/page/child2 and so on.. I've been searching around ...
1
vote
1answer
138 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
534 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
2answers
17k views

How to Create a Custom WordPress Navigation Menu with the Code?

Without using plugins, how to create a custom WordPress navigation menu with the code? I have Wordpress ver 3.2.1 and Buddypress ver 1.5.1 I would like to create a menu like this: click here I would ...
1
vote
1answer
477 views

Bar separated navigation by extending Walker_Page

This question follows on from this one: Bar separated navigation by extending Walker_Nav_Menu I'm trying to do the same thing but this time I'm extending Walker_Page instead. The issue I'm having ...
1
vote
1answer
330 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): ...
1
vote
2answers
1k views

Break apart wp_list_pages in order to customise it

I'm trying to 'break apart', (think explode is the correct terminology), wp_list_pages in order to add some definition list code into it, (dl, dt, dd). Here is the html code that I'm trying to ...
0
votes
1answer
129 views

Navigation link to specific user page

I asked this question and got a great reply - Associate Page with User - so I can now associate a post with a specific user as required. What I want to do is include in the main site navigation a ...
0
votes
1answer
964 views

Dynamically changing navigation links (next and previous) via AJAX

In my wordpress site, I have inside the loop of single.php , a select tag in which the options are the posts of the current category returned via a custom query. On changing selected option, I have ...
0
votes
2answers
222 views

custom menu not found

I am trying to use a menu which I have partially working, I have setup functions.php: if (function_exists('register_nav_menu')) { register_nav_menu('main-menu', 'Main Menu'); } I have configured ...
0
votes
3answers
2k views

wp_nav_menu not appearing for a couple pages

I solved the problem with the page, the correct answer is ptriek's comment below. Well I'm having a bit of an odd problem here, wp_nav_menu works on all pages EXCEPT my category pages (probably my ...
0
votes
2answers
906 views

Different Main Navigation per category

I have a client who has the categories listed in the right-hand sidebar. He came to me today requesting a different "navigation" in the header for each category. So basically, if you click on ...
-1
votes
1answer
190 views

All navigation fails and leads me to homepage

I installed a plug-in and then uninstalled and deleted it (wp e-commerce). Now all links lead me back to homepage. When I click on a post heading I go to homepage. I do not have caching. I tried ...