Removing link ” from ” menu for some “links” without JS

Assuming you’re using wp_nav_menu() to display your navigation you could apply a walker that looks for css classes: $items_wrap = ‘<nav class=”…”>’; $items_wrap .= ‘<ul id=”%1$s” class=”%2$s”>%3$s</ul>’; $items_wrap .= ‘</nav>’; wp_nav_menu( array( ‘container’ => false, ‘container_class’ => false, ‘menu_class’ => ‘…’, ‘echo’ => true, ‘before’ => ”, ‘after’ => ”, ‘link_before’ => ”, ‘link_after’ => … Read more

Show just one level of child pages, wp_list_pages woe

This should work, using nothing more than the available argument-array parameters for wp_list_pages(): specifically, depth and child_of. To display one level of hierarchy, for descendant pages of the current page: <?php // Globalize the $post variable; // probably already available in this context, but just in case… global $post; wp_list_pages( array( // Only pages that … Read more

Strict Standards Error bootstrap navwalker

It means that the declaration of the start_lvl method in wp_bootstrap_navwalker should match the declaration of the method in Walker_Nav_Menu. It doesn’t. function start_lvl( &$output, $depth ) { VS. function start_lvl( &$output, $depth = 0, $args = array() ) { Make the arguments match exactly and you should be fine. And you should probably not … Read more

Using WordPress to make a “Product Search” type navigation drilldown

There’s a way to set custom post-type search. I can only head you in the right direction and answer the first part of your question. The other part about COOKIES you’ll have to review php documentation. Also, I don’t know exactly what the other $_REQUEST variables you may have set for your custom post type. … Read more

Add Dividers or Separators Between Nav Menu Items

Use a custom walker. Extend start_el() to print <li class=”menu_separator”><hr></li> if the menu title is just a ‘-‘. functions.php function wpse38241_setup_menu() { register_nav_menu( ‘main-menu’, ‘Main Menu’ ); } add_action( ‘after_setup_theme’, ‘wpse38241_setup_menu’ ); /** * Replaces items with ‘-‘ as title with li class=”menu_separator” * * @author Thomas Scholz (toscho) */ class Wpse38241_Separator_Walker extends Walker_Nav_Menu { … Read more

Add custom meta to nav menu items

here is a quick code that should do the job, paste this in your theme’s functions.php file basically what it does is hide all regular class input boxes and adds a new select dropdown which changes the value of the hidden input based on the selected value. and it looks like this; function menu_item_class_select(){ global … Read more

How to Get Next or Previous Post in a Specific Tag?

get_adjacent_post(), which is used by all functions that return a (link to) the next or previous post, only has a $in_same_cat argument, which looks at the categories the post is in, not the tags. You could hook into the get_[next|previous]_post_join to modify the join query for your call, but then it’s probably easier to copy … Read more