It turns out i solved the problem by renaming my Staff template from archive-staff.php to page-staff.php (or anything else for that matter), thus specifically telling WordPress not to trust the template hierarchy logic and to consider that url as a “page” url, not a custom post type archive.
If you happen to have a use for this function, be aware that it will mainly work for page templates. Anything else needs to be tested, and post archives will not work.
Related Posts:
- next_post_link() on custom menu structure
- Removing link ” from ” menu for some “links” without JS
- Attaching a navigation menu to the admin bar?
- Multi Level Bootstrap Navigation Menu in WordPress
- How to custom output wp_nav_menu()
- Determine if a navigation item has children
- Directing a page to a default subpage
- How to register custom menu widget
- Menu items id’s – are they 100% unique?
- How to var_dump nav menu items from anywhere?
- Links open only on new tab or window
- Show different different menu in theme_location depending on x
- How to Create a Custom WordPress Navigation Menu with the Code?
- Show all parent pages and their children below from same author as currently viewed page
- How to add ID and class in nav menu walker?
- Set Item Order with wp_nav_menu_{$menu->slug}_items
- How can I get an array/list of all current WordPress Admin Menu items?
- Add class to active element and its parent in nav menu
- Handling complex multi-level architecture / menu for large site
- Menu styling for last menu item
- WP Nav menu append to url
- Hiding Admin Page While Keeping Menu Expanded
- How to add a tag to wp_nav_menu in a child theme
- How can I remove data-target=”#” from bootstrap dropdown menu?
- Use wp_nav_menu to display ALL pages
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Best way to customise wp_nav_menu [duplicate]
- Navigation Menus Depth for specific menus
- How to Overwrite/Customize wp-admin/nav-menus.php in WordPress
- Filter for Admin Nav Menus Drop Down
- How do you manage large menu hierarchies in WP?
- wp_list_pages() but only show children on the branch you are on
- Tidy nav menu classes except for edit-menu-item-classes and active class
- I need help adding a second custom menu item to the WooCommerce account area menu
- Why aren’t my post showing under my custom menu?
- Custom Menu’s – Disable Link checkbox
- custom walker nav issue involving ajax
- How to add html attributes to the “ul” html tag with “wp_nav_menu” function?
- Can I have a different menu for each parent page?
- Conditional menu display
- Give child-categories same class (the parent category-slug) as parent in menu list?
- Combine 2 categories in one Menu item
- Wrap list parent in div with wp_nav_menu menu
- WordPress Menu Exchange On Tablet’s Orientation
- How to add a element with walker menu right after begin of the navigation tags?
- Custom Menu not functioning properly
- Using front-page.php need new blog page
- Increase wordpress menu Depth
- How to hide the menu item created by the theme in WordPress admin panel?
- Custom menu walker – remove li tag based on class name
- Hide pages from the main menu
- How to customize the built in menu in wordpress?
- Current author archive in navigation menu
- Adding CSS-class to WordPress Menu in backend
- How to get or know the slug of home.php
- Set first level items to in wp_nav_menu()
- Difficulties filtering manage_nav-menus_columns
- How to create menu spread over four lines including images
- plus sign not working in widget “Header: Nav Menu”
- Do not hyperlink menu heading
- Adding conditional classes to wp_get_nav_menu_items
- WordPress menu items automatically becoming empty custom links
- Help with WordPress Custom Nav Walker
- Replace the page url with a menu link?
- Cannot collapse a responsive menu in WordPress
- Change hover to onclick on menu
- How can I get back the content of a sub-menu
- Only the index.php/homepage open while other pages are not opening
- Why my dropdown menu is effecting main menu?
- Does the Default theme of WordPress like 2016, 2017 and 2019 uses Walker_Nav_Menu Class
- WordPress Menu Navigation links not working
- How to apply individual menu item’s “CSS Classes” to , not ?
- Display_name in menu
- How to access into the description of a sub menu
- Get Sub-Menu Dropdown to Show Over Page Content
- Foundation Scripts not loading (custom theme)
- How to Add Class in
- Menu Details Output in Javascript [closed]
- Get menu items problem
- Can’t add any menu items anymore, server related
- Loading wordpress menu in an external server
- Need direction on a seemingly complex menu walker for automatically inserting a parent link li in it’s submenu ul
- Show only second level menu items? [duplicate]
- Add item ONLY to the primairy navigation
- wp_nav_menu in 3.7 add name class nav navbar-nav
- Prevent Menu Shortcode From Formatting
- individual images as navigation design TwentyTen
- What is the best way to incorporate responsive dropdown navigation menu into custom theme?
- how to add permalink/slug to wordpress custom link menu item
- Using walker to display all menu branches at once?
- How to add a class directly on a unordered list element that is a primary navigation
- Submenu items not working anymore
- Icon not shown in Dropdown menus in Twenty Seventeen Theme
- How to change WP menu item type?
- How to change mobile menu (toggle) icon in WordPress – Full Site Editing?
- add_submenu_page add multilevel menu
- Menu drop down covers contents of page in Mobile view
- How to get the navigation menu items? [closed]
- conditional menu with custom fields
- Confused over difference between post and menu hierarchy