Viewing 2 reply threads
  • Author
    Posts
    • #1383
      bicho44
      Member

      WordPress Codex about query_post()

      Note: This function isn’t meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. Double Note: query_posts() is overly simplistic and problematic way to modify main query of a page by replacing it with new instance of the query. It is inefficient (re-runs SQL queries) and will outright fail in some circumstances (especially often when dealing with posts pagination). Any modern WP code should use more reliable methods, like making use of pre_get_posts hook, for this purpose. TL;DR don’t use query_posts() ever;

      Post to post relationships

    • #1386
      Kevin
      Keymaster

      Outstanding point. We were using it for a specific reason but no longer. We will update the documentation, thanks for the heads up!

      Kevin

    • #1423
      Steve
      Keymaster

      @bicho44– Thank you for the input. Our docs have been updated to use get_posts> Thanks.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.