WordPress Menu Navigation links not working

Here are a couple things I noticed. You don’t want to include the <a> inside of link_before or link_after, you will get 2 links if you do that. You also don’t need the <ul>. Instead I think you want something like this… <?php wp_nav_menu(array( ‘theme_location’ => ‘primary’, ‘before’ => ‘<class=”nav-item active”>’, ‘menu_class’ =>’navbar-nav mr-auto’, ‘link_before’ … Read more

Searching for a one page overview widget

You can add a menu item whose link goes to a specific section on the same page or a section on a different page. This works with any WordPress menu, which you can create and edit by clicking Appearance > Menus in the WordPress admin panel. This technique involves two steps: adding a unique ID … Read more

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