After run a query
$posts = (array)new WP_Query($args);
I use this data to do some calculation on post meta. I didn't display the posts. Do I still need to use wp_reset_postdata after the query?
|
After run a query
I use this data to do some calculation on post meta. I didn't display the posts. Do I still need to use |
|||
|
|
|
If you called the_post() on the query, then yes. This resets the global variables used in the main queries. |
|||
|
|