how to display different menu according to postid?

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/

How to use Bootstrap Navbar in wordpress Nav Menu

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

Adding additional html to the end of the root level in a custom nav walker

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>’ ) ); ?>

How To Add The Help Scout javascript LiveChat from the WordPress menu

Use add_action to add a function to the wp_footer hook, and then inside the function you can check if you are on a specific page before outputting the script. eg. the Help Scout scripts on the /contact-us/ page: add_action(‘wp_footer’, ‘maybe_add_javascript’); function maybe_add_javascript() { if (!is_page(‘contact-us’)) {return;} ?> <script type=”text/javascript”>!function(e,t,n){function a(){var e=t.getElementsByTagName(“script”)[0],n=t.createElement(“script”);n.type=”text/javascript”,n.async=!0,n.src=”https://beacon-v2.helpscout.net”,e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],”complete”===t.readyState)return a();e.attachEvent?e.attachEvent(“onload”,a):e.addEventListener(“load”,a,!1)}(window,document,window.Beacon||function(){});</script> <script type=”text/javascript”>window.Beacon(‘init’, ‘602b66a1-948e-493f-b0dd-c2828b2eb860’)</script> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)