Assign a different menu depending on custom taxonomy

I think the way to do this is: Set up your menu in Appearance > Menus as you mentioned; In your theme’s header.php (or wherever you find the wp_nav_menu() code that displays your current menu), set up a WordPress conditional to check if the page being visited is a location taxonomy archive, and display different … 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

Used a code to revoke some dashboard menus for my contributors but for some reason it’s revoked me access to the editor [closed]

Issue #1 This line of code define( ‘DISALLOW_FILE_EDIT’, true); does not go into functions.php. It should be removed from function.php and put in your config file, wp-config.php in the root of your WP install. Here is more info on what DISALLOW_FILE_EDIT does. Issue #2 You are removing the menu items for admins. if(current_user_can( ‘administrator’ )){ … 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