Why do Custom Nav Menus generate so many classes on list items? Can I manage this somehow?

I’m going against the majority on this one 🙂 Yes, it can be a good idea to strip it down. Personally I’m keeping only the current-xxx type classes and replacing them with active, and active-parent (for active parent or ancestor items). Why? around the web, active has became the standard class for active menu items … Read more

Assign a Class to the Current “Tag” for Formatting

Add something like this to the functions file: function current_tag($tags) { global $wp_query; $cid = $wp_query->query_vars[‘cat’]; foreach($tags as $tag) { // match tagid to $cid } } add_filter( ‘get_the_tags’, ‘current_tag’); This won’t work by itself, but it will be a good start for getting the right information to the right place.

How to avoid wp_nav_menu() ID conflict?

The solution is not to call the same ‘theme_location’ more than once. Theme location is intended to represent an explicit location within the template. Just register a separate ‘theme_location’ for each separate location within the template that you want to display a nav menu. Consider your chosen ‘theme_location’ names to be semantic names, representing the … Read more

Making breadcrumb with wp_nav_menu

I couldn’t believe there is not a single FREE plugin available that does this. So I wrote my own function. Here you go. Just copy this to your functions.php: function my_breadcrumb($theme_location = ‘main’, $separator=” > “) { $theme_locations = get_nav_menu_locations(); if( ! isset( $theme_locations[ $theme_location ] ) ) { return ”; } $items = wp_get_nav_menu_items( … Read more