[wp-trac] [WordPress Trac] #18408: Can't wp_reset_postdata after custom WP_Query in an admin edit page

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 15 22:09:51 UTC 2011


#18408: Can't wp_reset_postdata after custom WP_Query in an admin edit page
--------------------------------------------------+------------------------
 Reporter:  ericlewis                             |       Owner:  ericlewis
     Type:  defect (bug)                          |      Status:  closed
 Priority:  normal                                |   Milestone:
Component:  Editor                                |     Version:  3.2.1
 Severity:  normal                                |  Resolution:  invalid
 Keywords:  has-patch needs-testing dev-feedback  |
--------------------------------------------------+------------------------

Comment (by ericlewis):

 Bill - you can access all post data via the $myposts object in the foreach
 loop without using the setup_postdata() as class variables of each $post,
 I believe setup_postdata just makes it more simple to access via template
 tags.

 I do agree with you that it would be nice to use template tags in meta
 boxes, just to keep things cleaner and one less thing to remember.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18408#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list