It sounds like you just need wp_reset_postdata()
after you run any extra queries, and before you output your menu.
Related Posts:
- Show just one level of child pages, wp_list_pages woe
- Ways to give a wp_list_pages menu link specific class names?
- wp_list_pages – show pages immediately 1 level below current level
- Handling complex multi-level architecture / menu for large site
- No link on empty page in wp_list_pages
- wp_list_pages sort order is different for different languages [closed]
- wp_list_pages: only show subpages on the parent page?
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- Highlight another nav item
- wp_list_pages() but only show children on the branch you are on
- Displaying different page links on different pages
- How to remove the HOME menu item
- How can I list the current pages siblings and any ancestor page siblings?
- Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs
- wp_list_pages Hierarchical Help
- Wp_list_pages not showing children with custom page template
- How to use wp_list_pages on a grandparent page
- Can you exclude child pages of a specific parent within a navigation?
- horizontal menu / 4-level depth
- Creating navigation out of specific IDs and their children?
- How to display list of child pages with parent in wordpress?
- wp_list_pages, links only for pages with no children
- Display all submenus
- Showing Custom Menus in the sidebar
- Second tier sidebar navigation
- Removing container from wp_nav_menu not working
- Check if page is in a certain menu
- Increase search results for Admin -> Appearance -> Menus -> Search (default is 10)
- Is it possible to add classes to list items in wp_nav_menu()?
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- Exclude one item from wp_list_pages( $args );
- How to show only parents subpages of current page item in vertical menu?
- Page not appearing in navigation bar
- Extend WordPress REST API to show slugs for menu items
- WordPress Custom Menu Widget Style
- Output menu navigation in php file
- Custom Post type menu highlighted in the archive/post
- Unclickable Menu Item Label in Custom Menu with Clickable Children
- Remove Metabox from Menus screen
- Sort wp_nav_menu() by menu order
- How to fix “Supplied nav_menu_item value missing property” after update to WordPress 5.0
- How to add programmatically all pages and children to backend menu
- Separator for custom nav menu
- add_submenu_page function to show videos table
- Menu item with no page, but with dropdown
- Create a MegaMenu using a walker and the start_lvl function
- Nav and logo loading each time causing menu to move JointsWP – Foundation 6
- WordPress Plugin menu position overwrite other item
- Change submenu markup
- Get page slug/id from position in menu
- Two different “Home” items in custom menus dashboard section
- list category posts under its item in menu
- How to re-arrange the MENU of “Allure Real Estate Theme for Placester” wordpress theme?
- Using _s theme, menu changes do not affect header menu
- Change class-name on “current_ancestor” in wp_nav_menu
- styling wp_nav_menu – horizontal, sub-menu drop downs
- Show children (sub-navigation) of active menu item only
- Make menu items open in new tab/page
- How do I hide “Pages”, “Media”, “Comments”….for editor role?
- how to change the color of menu text wordpress?
- Walker Class: Output Parent Description and Featured Image right after sub-menu?
- Generate Navbar In WordPress
- Showing home button in a specified menu
- Odd spacing in Navigation Bar [closed]
- An alternative to WordPress’s built-in menu functionality
- Add session or cookie to remember last menu location
- Is there any way to change the CSS class applied to 2nd level sub menu ul’s?
- sub.menu’s not working
- How to change how WordPress renders navigation menu on Block Themes
- Problem with links once in portfolio item
- How to link current logged-in user to their author page via URL (Beginner)
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- Add Different Class on Different Ul in twenty-twentyone theme
- How to create a link-less parent (top level) menu item that doesn’t use an anchor tag
- wp_nav_menu container style args
- Structuring Nav Menu and Background Custom page (Help)
- Adding additional html to the end of the root level in a custom nav walker
- wordpress custom menu – show parents, siblings, children depending on depth
- add_theme_support( $feature=’menus’ )
- How to swap text in menu item back and forth?
- WordPress menu issue – if there are child links partents won’t click
- Build a one-page navigation within a non-one-page ttheme…
- Add class to specific li item menu in function.php
- WordPress customizing a walker menu class
- how do you create this customize menu using wp_nav_menu function?
- Show thumbnail to category items in wp_nav_menu(), how?
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- When submitting more than 200 menus, I get “Service Temporarily Unavailable”
- Limit the amount of menus someone can make
- How to customize navigation menu?
- Active menu also for single array
- Navigation list not correctly styled on pages with custom template (missing .current-menu-item)
- How to make an anchored page in a navigation menu tab
- Change menu item order
- Menu System: Custom Links
- nav tag wrapping around dropdown
- Resolve the debugs
- Formatting WordPress Menus (without bullets, inline with text)
- child theme font awesome icons not working
- add dynamic ID for wp_nav_menu after and before