get menu id using its name

I have a menu name Social Network. I want to get the menus ID. I tried the following, but didn’t succeed. global $wpdb; $menu_slug = ‘social-network’; $menu_id = $wpdb->get_results( ” SELECT TERM_ID FROM $wpdb->wp_terms WHERE name = “.$menu_slug.” ” ); echo $menu_id; 4 Answers 4 You can use the function get_term_by and use ‘name’ in … Read more

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 … Read more

Add custom text to menu

How i can add custom text to menu? I want such structure in output: <ul> <li>home</li> <li>services <ul> <p>services</p> <li><a href=”#”>service1</a></li> <li><a href=”#”>service2</a></li> <li><a href=”#”>service3</a> <ul> <p>service3<p> <li><a href=”#”>service 3.1</a></li> <ul> </li> </ul> </li> </ul> Thanks! 3 Answers 3 There is another alt way to do this with CSS3. You would add a link to … Read more

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 … Read more

Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?

I’ve found this new plugin http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1 that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the nav-menu-item array before they are parsed by the walker class, if a user isn’t logged in. The plugin uses a specific CSS-class as identifier to decide which items to remove. So I’ve been wondering if … Read more

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 … Read more

wp_list_pages sort order is different for different languages [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years … Read more