Articles of menus

How to show only parents subpages of current page item in vertical menu?

I just can’t find a way to make it possible to show only current parent items down to current page item in a vertical menu the “wordpress way”. What I want to achieve is the following dynamic structure, if I visit Page Page 1 Page 2 Page 3 Page 4 Page 3.1 Page 3.2 […]

horizontal menu / 4-level depth

I need a 4-level horizontal menu. which is the best way to build, organize and style it? “Active” tabs should be highlighted. <?php wp_nav_menu( array( ‘theme_location’ => ‘header-menu’ ) ); ?> Or: <?php wp_list_pages(‘include=137,693,139,147&title_li=’); ?> I am new to using wp_nav_menu();. I have built 2-level wp_list_pages(); menus.

Conditional custom menu?

I’m trying to create a custom menu that displays a <li></li> when a user is logged in, and not display it when they’re not. I have this so far, but it’s not working. Does anyone know how to do this properly? add_filter(‘wp_nav_menu_items’,’custom_nav_items’,1,2); function custom_nav_items($menu, $args) { global $bp; $args = (array)$args; if ( $args[‘theme_location’] != […]

Check if page has subpages

I’m try to build a menu with wp_list_pages() that must work like this: Main Page -Subpage1 -Subpage2 I check if the Page has_subpage and i can see the 2 subpages when i’m in the Parent but when i’m visit one of the subpages i don’t see anything. So, what i can do to check if […]

How to output all taxonomy links from a custom post type in a menu?

I made a custom post type called Product. And a taxonomy with the name ‘product-category’. These taxonomies have pages where we show a list of the products that have that taxonomy. Now my question is how to get all the taxonomies as a menu in the header. Its an awful lot of work to add […]

Editing the nav menu?

I want to add | (vertical lines) between the page links in the nav menu. What’s the easiest way to do this?

wp_nav_menu: output featured image of each page listing

Context: I am building a portfolio index where I can sort the individual project links in my sidebar by priority of appearance. I’ve successfully done this using the wp_nav_menu(), where each project is represented by the text name, and then I can move each Page’s priority of appearance. What I get is something like this: […]

Most allowed Taxonomies in Appearance->Menus

I am managing a large list(300) of “places” taxonomies, and I need to create a menu with those places. the WordPress menu system seems like the way to go but when I save the menu I am getting a PHP timeout error. Why is this taking so long to save the menu? Is there a […]

Missing current_page_item in custom menu

I’m using the new custom menus in my side navigation and it only creates a class sub-menu in the UL’s but does not use the current_page_item like when you use wp_list_pages(). I have 3 levels and only want to show the sub menus of the page you are on, easily done using wp_list_pages() but I […]

Hard-coding a shortcode as the last menu item in primary navigation?

I have Genesis framework installed with a child theme. My client wants their themes “shopping cart” shortcode to be the last menu item, in their primary nav, no matter how many menu items there is. The shortcode: echo do_shortcode(‘[shopping_cart]’); Current code: $nav_output = sprintf ( ‘<div id=”nav”>%2$s%1$s%3$s</div>’, $nav, genesis_structural_wrap( ‘nav’, ‘<div class=”wrap”>’, 0 ), genesis_structural_wrap( […]