When submitting more than 200 menus, I get “Service Temporarily Unavailable”
When submitting more than 200 menus, I get “Service Temporarily Unavailable”
When submitting more than 200 menus, I get “Service Temporarily Unavailable”
I had an error in the above code. $key used in both for loops. Working code for filtering empty product categories out of menu items: function exclude_empty_cat_menu_items( $items, $menu, $args ) { // Get a list of product categories that excludes empty categories $non_empty_categories = get_categories(array(‘taxonomy’ => ‘product_cat’)); // Iterate over the menu items foreach … Read more
Menu not saving in dashboard
You could use conditional statements to show the children. Depending on what your using to categorize the pages… If you were using parent / children categories it would work something like this: <?php if ( in_category( ‘New Watches’ )) { // show new watches menu } elseif ( in_category( array( ‘Classic Watches’ ) )) { … Read more
This isn’t really WordPress specific, but here goes. Really, all you’re missing is applying the blue background image on .current-menu-item a. /* Default state base */ .widget_nav_menu .menu li a{ padding-left: 35px !important; background-position: 5% 50%; background-repeat: no-repeat; } /* Active state base */ .widget_nav_menu .menu .current-menu-item a, .widget_nav_menu .menu .current-menu-item a, .widget_nav_menu .menu .current-menu-parent … Read more
Disappearing items in menu
So after a whole bunch of digging I found what I was looking for near the bottom of this page: http://codex.wordpress.org/Function_Reference/add_menu_page#Examples
Navigation menus are technically terms, but there is pretty rich API around theme to abstract that away. wp_get_nav_menus() should do it. 🙂
How to add a code for lastpostdate after/inside a specific menu link?
Put this function into your theme’s function.php file. function is_tree($pid) { // $pid = The ID of the page we’re looking for pages underneath global $post; $anc = get_post_ancestors( $post->ID ); foreach($anc as $ancestor) { if(is_page() && $ancestor == $pid) { return true; } } if(is_page()&&(is_page($pid))) { return true; /*we’re at the page or at … Read more