show current item in custom menu, when inside a custom post type

Put this in your functions.php: function additional_active_item_classes($classes = array(), $menu_item = false){ global $wp_query; if(in_array(‘current-menu-item’, $menu_item->classes)){ $classes[] = ‘current-menu-item’; } if ( $menu_item->post_name == ‘product’ && is_post_type_archive(‘product’) ) { $classes[] = ‘current-menu-item’; } if ( $menu_item->post_name == ‘product’ && is_singular(‘product’) ) { $classes[] = ‘current-menu-item’; } return $classes; } add_filter( ‘nav_menu_css_class’, ‘additional_active_item_classes’, 10, 2 ); … Read more

Automatically Display Sub Menu

If your developing this theme with your own html mark up and css then should be fairly easy… <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘topNav’, ‘after’ => ‘<span> </span>’ ) ); ?> You will notice this menu PHP generates a unordered list with your sub menu as a nested unordered list. See your … Read more

How can I create an automatic drop down menu with my tags?

wp_list_categories is what you’re after. It takes taxonomy as an optional argument. Example taken from Codex: <?php $taxonomy = ‘genre’; $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // 1 for yes, 0 for no $title=””; $args … Read more

Submenu in sidebar custom page template

If you are trying to code this yourself, all the info you need is in the WordPress Codex – http://codex.wordpress.org/Template_Tags/wp_list_pages#List_Sub-Pages Alternatively you could use a widget like the BE Subpages Widget

changing theme folder name breaks menus – twentyeleven

Try going to Dashboard -> Appearance -> Menus and re-applying your custom menus to the appropriate Theme locations. By changing the directory name, you’ve impacted the theme_mods, including custom menus. To WordPress, /wp-content/themes/twentyeleven/style.css and /wp-content/themes/X/style.css are two different Themes, even if all the files are the same.