It turns out that the first hook function, which contained a query needed a reset.
Adding wp_reset_query();
after the initial query has fixed the issue.
Related Posts:
- Issues with title-tag and document_title_parts
- Define custom Page Template without its own .php file
- Does hooking into the same action multiple times drain memory?
- Extract image from content and set it as the featured image
- Issue with get_theme_mod returning a blank value instead of the saved value
- deregister scripts on certain page
- Show modified time if post is actually modified
- why doesnt is_home() work in functions.php
- How to create thumbnails for PDF uploads?
- How can I tell if I’m on a login page? [duplicate]
- Why get_header() or get_footer() does not run twice if called in the same php file?
- is_front_page not working in functions.php
- disable comments if array exists
- Change parent theme file function in child themes functions.php
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- Conditional tag is_page with a custom post type
- How do I change parameters without changing the core
- Is it possible to be more page/post specific with admin_enqueue_script?
- Issue adding text after short description on product pages Woocommerce [closed]
- Customize “the_posts_pagination” and put list instead div
- Limit posts only on home page – ideally in functions.php
- Increment price for Woocommerce Minicart [closed]
- Proper way of using functions in action hook?
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- How to properly add function called by action-hooked function to functions.php?
- Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
- Enqueue scripts not working with if is page conditional tag in functions.php
- Running a script before absolutely everything
- How to display post content instead of excerpt
- Add function to every post?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Conditional read more adjustment
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- Trigger a custom function when option are saved in admin area
- Execute a ultimate member action when user role is updated
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- Conditional Gravity Forms filter in WordPress Multisite
- Has is_archived() for sites in a multisite changed with WP 4.7?
- jQuery does not work
- Pass parameter to hooked function using custom page template
- Override the WordPress core function wp_referer_field
- How to return hook data when multiple parameters are present?
- Hook into a function without a hook?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How to edit the Tags within the image file URLs?
- Is my code correct to enqueue CSS on a specific page?
- Can’t properly set the_title add_filter to show short_URL
- Control the srcset much more (not all sizes in it each time)
- How to add_filter html template to middle of content
- Filter yoast canonical add_action priority [closed]
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Is there a way to prevent a function/method from being called outside a specific hook?
- Auto log in hook is requiring a page refresh
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- is_page() or is_single not working
- Function not working inside of a function in functions.php
- issue with if/elseif in_array inside foreach loop display only one post
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”
- Writing a function to detect an event
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Changing where my author box is printed
- Add Adsense code between job listings – wp job manager plugin
- update_post_meta is Updating with two page id
- Entirely Different Functions.php per Page?
- How to place a div inside a function that creates a div
- Filter for replacing the WP_query object for a given category
- WordPress comment processing . Default unapproved comments detection before posting
- Save_post – Warning: Cannot modify header information
- What is the earliest Hook a Script can use?
- Populate acf-field, depending on block name
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- custom error message for empty username and password using authenticate filter not working
- Enqueue script if not page template
- How Do I Unhook This Parent Theme Function?
- Get post_author email for Zapier Integration
- How can I stop the hook from breaking the login/logout function?
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- How to echo the translated custom field?
- how to display featured image for single post for a specific category
- Function the_content
- save_post hook – headers already sent?
- admin-ajax.php nulls all php variables
- Add custom fields after post/page title
- Force resize for all video content
- wp_enqueue_scripts called twice?
- Unhook the comment form in Buddypress
- Why wp_ajax hooks doesn’t work?
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- How can i hide content if not friend in Buddypress? [closed]
- Why functions metaboxes is causing White Screen in Admin [closed]
- image_size with respect to aspect ratios
- PHP Notice: Function is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false
- Create section wit form