wordpress custom menu – show parents, siblings, children depending on depth
wordpress custom menu – show parents, siblings, children depending on depth
wordpress custom menu – show parents, siblings, children depending on depth
You can use wp_nav_menu($args) to display different menus. Just pass menu ID, slug, name or object as $args[‘menu’] parameter. if ( $post->ID == 2309 ) { $args = array( ‘menu’ => ‘some-menu’ ); wp_nav_menu($args); } There are also other available parameters that you can pass to the function, https://developer.wordpress.org/reference/functions/wp_nav_menu/
This is what solved the issue: <?php wp_nav_menu(array(‘theme_location’ => ‘header’,’menu_class’ => ‘header__nav’));?>
This issue occurred in WordPress core development. they give me answer on below ticket thread Date: Thu, 12 Sep 2019 15:36:49 -0400 Subject: [PATCH 1/2] Added special character decode to menu item title src/wp-includes/nav-menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index f130d2f3e1..db8a2fcf78 100644 find this code on … Read more
So you’ve added the primary menu location Then you can add the menu with something on the following lines (preferably in header.php): <nav id=”menu-bar” class=”navbar navbar-fixed-top navbar-light w-100″> <a id=”” class=”navbar-brand” href=”#”> </a> <button style=”display:block;” id=”responsive_hamburger” class=”hamburger navbar-toggler” type=”button” data-toggle=”collapse” data-target=”#navbar-content” aria-controls=”navbarSupportedContent” aria-expanded=”false” aria-label=”Toggle navigation”> <span class=”hamburger-box “> <span class=”hamburger-inner “></span> </span> </button> <div class=”collapse … Read more
Header Navmenu glitching in Chrome (but not other browsers)
The wordpress plugin archive offers a lot of options for this kind of topic. You should read the explanations and documentation of the plugin. Here are the plugins I would recommend to you; https://wordpress.org/plugins/formidable/ https://wordpress.org/plugins/quiz-master-next/ https://wordpress.org/plugins/wp-polls/ https://wordpress.org/plugins/social-polls-by-opinionstage/ https://wordpress.org/plugins/yop-poll/
They just use the default markup. You only need to define your own walker class if you’re changing the markup from the default. Believe it or not, but it’s perfectly possible to create menus without Bootstrap! The only exceptions to the default menu markup is that some of the default themes, like Twenty Nineteen, use … Read more
Hope this code will helpful for you, add the items_wrap in wp_nav_menu to merge li’s <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘container’ => ”, ‘menu_id’ => ”, ‘menu_class’=> ”, ‘items_wrap’ => ‘<ul id=”%1$s” class=”%2$s”>%3$s<li><a href=”http://www.example.com/contact”>Contact</a></li><li><a href=”javascript:void(0);”>Search</a></li></ul>’ ) ); ?>
Why my dropdown menu is effecting main menu?