Navbar is hidden behind carousel when using wp-boostrap-navwalker

Well figured it out by myself. z-index was set on the wrong element. Add a new class to the container_class property: <?php wp_nav_menu( array( ‘theme_location’ => ‘header-menu-left’, ‘dept’ => 2, ‘menu_class’ => ‘navbar-nav justify-content-end’, ‘container_class’ => ‘collapse navbar-collapse YOURCLASS’, ‘container_id’ => ‘navbarNav’, ‘fallback_cb’ => ‘WP_Bootstrap_Navwalker::fallback’, ‘walker’ => new WP_Bootstrap_Navwalker(), ) ); ?> and change the … Read more

Redirect User when they click Menu Option

The first problem I see is here: if( get_page_by_slug($slug) ){ }wp_redirect(‘https://example.com/private-page/’.$slug.”https://wordpress.stackexchange.com/”); exit; The if() statement will do nothing; your wp_redirect() and exit statements are outside the {} braces. Try this instead: if( get_page_by_slug($slug) ){ wp_redirect(‘https://example.com/private-page/’.$slug.”https://wordpress.stackexchange.com/”); exit; } Aside from that, a couple other things to check: You say the code is in function.php; if you’re … Read more

How can I order these pages in this navigation bar on this old wordpress theme?

I suggest you change code of your greenday_get_menu_from_pages() function a little bit, just so that the results are not ordered by post_title which is default for get_pages(), but ordered by menu_order, which is what most “page ordering” plugins you have tested actually work with. So here is one new line in your function: function greenday_get_menu_from_pages() … 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 create a Child & Siblings menu for a custom post type?

OK, I think I have cracked it. The below code seems to work well. To be able to use a custom post type I added an argument into the $args array’post_type’ => ‘product’, Is the below OK? <div id=”sub-pages”> <?php global $post; $args = array( ‘post_type’ => ‘product’, ‘child_of’ => get_top_ancestor_id(), ‘title_li’ => ” ); … Read more