Articles of menus

Replacing a specific menu item

So, I understand how to target a specific menu using the following to add a custom code. <?php wp_nav_menu( array( ‘menu’ => ‘Project Nav’, // do not fall back to first non-empty menu ‘theme_location’ => ‘__no_such_location’, // do not fall back to wp_page_menu() ‘fallback_cb’ => false ) ); ?> Question I have is the following. […]

Vertical Sidebar Menu Parent and Child not displaying correctly

I am developing a WordPress site and trying to display my menu correctly. How can I display all Parent items but only show the Child items when it’s Parent has been selected. I hope that makes sense. Below is what I’m trying to achieve: What I want to achieve http://img.mywordpresstips.com/menus/snowflake-live.jpg And below is basically how […]

How to add a CSS class to the tooltip on a navigation menu?

I’m looking for a way to add a CSS class to the anchor tag of the tooltip on a menu item. Currently, I see that you can easily add a CSS class to the menu’s li but I’m trying to style the tooltip itself, not the menu item. Looking at the Codex for wp_nav_menu, I […]

Subpages in Menu Editor not Nesting

I am building a website for a public school district. All of our school buildings have common pages with the same name (i.e. Library, Nurse, Attendance, etc) that are nested under their parent building’s page. While trying to update our site navigation, I’ve noticed that for some reason the Menus -> Pages -> View All […]

How do I approach removing menu items on the fly based on settings in my plugin?

I’ve started writing a plugin that allows the administrator to select specific pages and set them to be visible only to logged-in users; the plugin optionally applies the restriction to all child pages too. When a site visitor attempts to view any of these pages, they get redirected to the login page. So far, so […]

Keep parent page active

I have a parent page on my main menu. When you click on that page, you are presented a sidebar with another menu listing of all of its child pages. When you click on one of the child pages, the parent page is no longer active in the top menu. How do I make both […]

wp_list_pages sort order is different for different languages

I’m using the following code wp_list_pages(array(‘exclude’ => ”,’title_li’ => ”,’sort_column’ => ‘menu_order’)) If I switch the language the sorting is different. One of the main menu points is listed at the end of the page when switching to my second language. Why does this happen? The pages have a sorting of zero when editing a […]

Add section to custom menu panel

I would like to add a new section in the custom menu panel that would allow predetermined URLs to be added to a custom menu. For example, I would like a custom post type archive page. I know that they can be added manually by specifying the URL in the custom link section, but then […]

WooCommerce dynamic menus

I have a basic WordPress site set up with the Suffusion theme and the WooCommerce plugin. This is working well for the most part, however when I have folks click / hover over the “Shop” menu icon I would like this to dynamically drop down with the product categories I have defined. How do I […]

Strange behavor of wp_nav_menu by not appearing

It is in header.php wp_nav_menu(array(‘theme_location’ => ‘top-nav’,’container_class’ => ”, ‘fallback_cb’ => ”)); in functions.php function register_custom_menus(){ register_nav_menus( array( ‘sidebar-menu’ => __( ‘Sidebar Menu’ ), ‘about-menu’ => __( ‘About Menu’ ), ‘toe-menu’ => __(‘To Exhibit’), ‘tov-menu’ => __(‘To Visit’), ‘media-menu’ => __(‘Media’), ‘top-nav’ => __(‘Top Nav’) )); } I do same thing for other theme and […]