how to mage the submenu open on wordpress active page

When on the Corporate profile page, that menu item has the following classes: current_page_item current-menu-ancestor current_page_ancestor. Any of these are attached to a menu item when you are on that page, or a child page. Target these in your stylesheet, and set the .sub-container div to have display:block;. That should do the trick. Also, your … Read more

buddypress slug issues [closed]

I know this is not the correct way and you should always edit the template but i just edited the core buddy press navigation function. You will see below the google link I added. function bp_get_displayed_user_nav() { global $bp; foreach ( (array) $bp->bp_nav as $user_nav_item ) { if ( empty( $user_nav_item[‘show_for_displayed_user’] ) && !bp_is_my_profile() ) … Read more

Unsual behaviour of navigation Menus

Problem was the theme that we purchase didn’t upload the plugins and other Java Script files properly So it was giving an error. Going through theme installation document helped me.

How To Add Class To Style Search Box

The tutorial shows you how to add a class and style it. add_filter( ‘wp_nav_menu_items’,’add_search_box’, 10, 2 ); function add_search_box( $items, $args ) { $items .= ‘<li class=”your-class”>’ . get_search_form( ‘echo=0’ ) . ‘</li>’; return $items; } For CSS questions, please ask on Stackoverflow. But the code doesn’t enable you to select between the primary or … Read more

My Menu Disappears on my Custom Link Homepage on Mobile

The mobile nav menu in your theme appears to be injected via JavaScript. On pages other than the home page the mobile nav does appear. It looks like the home page is the only page throwing JS errors; they appear to be associated with Mailchimp and/or Contact form 7 . Try disabling plugins for both … Read more

Elegant way of adding an CTA to a menu

As posted in StackOverflow by Oliver White: You can add this item as last in your menu, then assign custom class to this item and add required styles (positioning, CTA styles).

Menu not Showing on Mobile or While the page is shrinked

I can’t see the style.css file of this theme. But through browser I indicate, media rules (at line#4884 of style.css) for .menu-top-menu-container cause this behavior. Removing .menu-top-menu-container’s property from this media rules could fix your problem.

can anyone help me converting my static menu to wp_nav_menu I’am trying to add static menu item to WordPress Menu

<?php wp_nav_menu(array( ‘theme_location’ => ‘menu_location’, ‘container’ => false, ‘items_wrap’ => ‘%3$s’, ‘items_wrap’ => ‘<ul id=”nav-primary” class=”navigation %2$s”><li class=”normal”><a href=””><span class=”label-nav”></span><spanvclass=”label-nav-sub” data-hover=””></span></a> %3$s</ul>’, )); ?> Above example you can use your static item as well. TO make it dynamic you can use nav walker see this example – https://developer.wordpress.org/reference/functions/wp_nav_menu/#comment-content-207