WordPress.org

Ready to get started?Download WordPress

Forums

wp_reset_postdata function (1 post)

  1. central101
    Member
    Posted 1 year ago #

    Hello,

    I'm using a new WP_Query object to create multiple loops in my theme. I see on the codex that it says to use wp_reset_postdata when creating a new query which resets the $post object to the current post. This is only really necessary if I want to use the default the_post(); and such correct? I could just as well not include that and just create other WP_Query objects without affecting the default $post object. Am I right?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.