Support

Account

Home Forums Bug Reports acf/load_field alters $post? Reply To: acf/load_field alters $post?

  • Hi @yourmark

    Because your filter is creating a new WP_Query object, and using the function $apollo_home_teams->the_post();, the global $post will be over written.

    The best solutions is to not use WP_Query, but instead, use the get_posts function and loop over the results like an array.

    Thanks
    E