Articles of menus

Menu with Automatic Pages Included from Custom Post Type

Question – How can one utilize the wordpress 3.0 Menu system to automatically have new pages from a custom post type included within the menu (I am referring to the Menu Management area of wordpress for the public website). I believe this currently works for the regular “pages” if you check the automatically incude box […]

How do I remove the link element from the current page in a wp_list_pages menu?

WP makes a list of links, and helpfully applies a current_page class, but I’m concerned with the accessibility issues of a link to the page you’re on. Normally I’d swap the <a href etc with a <span, How would you approach that with WordPress? (apart from manually creating the list of pages!)

Add “parent” class to parent menu items

Is there a good way to add a class of “parent” to list items that have children using wp_nav_menu? I’ve found a couple of solutions online but non seem to have the desired effect.

How do you center the main menu in CSS?

Do any of you know of a way to center the main menu on my company’s site? I have been trying all day and am frazzled! I’ve tried editing the stylesheet but nothing has fixed it. I’ve tried throwing white-space: nowrap around in the CSS but it had no effect regardless of where I put […]

How do I hide one menu item link for logged in and logged out users

Using bbPress and s2Member, I need to hide the registration link in the menu for logged in users and the members directory link for non logged in users.

Add items to a menu dynamically

I’m doing a site in WP with dynamic and static content. I’d create the menu from the admin panel. I have 5 sections (Home, about, Boats, News(blog), contact). I’d create a custom post type with new taxonomies for the boats. What I want to do now is, display every new boat model as a sub […]

remove everything from wp_nav_menu

My theme has three 3 menus: two that are dropdown menus and one that is different. I want to remove the div, class, etc. from the menu that is different. For Example: I have three menus topnav ( drop down ) mainmenu ( drop down) mymenu ( normal ) My current code: <div id=”megaMenu” class=”megaMenuContainer […]

wp_list_pages: only show subpages on the parent page?

I’m using wp_list_pages(‘title_li=’) on my site. Some of my pages do have subpages, however I don’t want to list them unitl I’m on an actual parent page that has subpages. So imagine my front-page: — About Us — Gallery — Kitchen — Disclaimer When clicking on Gallery (and Gallery has two subpages) I want them to be listed […]

Wp_Nav_Menu – Identify the last menu item

I’m have a horizontal top menu with a solid border on the right hand side. <?php wp_nav_menu( array(‘theme_location’ => ‘primary’, ‘container’ => ”, ‘menu_class’ => ‘nav’, ‘fallback_cb’ => ”) ); ?> My CSS looks like this: body > header .nav li a { background: none; text-decoration: none; font-family: ‘Open Sans’, sans-serif; font-size: 13px; color: #000000; […]

wp_get_nav_menu_items order doesn't work

I am using this function $args = array ( ‘order’ => ‘DESC’, ); $items = wp_get_nav_menu_items( $custom_menu, $args ); then, if I change args to $args = array ( ‘order’ => ‘ASC’, ); and the result is still the same. Anybody have suggestion?