[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 01:31:00 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 billerickson):
Why was this set to invalid? I'm having the same issue.
My solution has been to save the original post in $original_post, then at
the bottom of my metabox put setup_postdata( $original_post );
While this works, it would be much better to be able to use wp_reset_query
or wp_reset_postdata.
If this ticket is invalid, what's the recommended approach for restoring
the query in a metabox?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18408#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list