[wp-trac] [WordPress Trac] #12320: Invalid call to wp_reset_query() inside Recent Posts widget
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 22 08:04:08 UTC 2010
#12320: Invalid call to wp_reset_query() inside Recent Posts widget
--------------------------+-------------------------------------------------
Reporter: michelwppi | Owner: azaozz
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Widgets | Version: 2.9.2
Severity: normal | Keywords: has-patch needs-testing query loop
--------------------------+-------------------------------------------------
Changes (by michelwppi):
* cc: michelwppi (added)
Comment:
Hi Scribu !
Thanks for your prompt answer. [[BR]]
I test your diffs inside a test website with some themes and the current
Kubrick theme. Now it works. Your idea to separate reset of wp_query and
reset of global post in two functions is a '''very very''' good idea.
[[BR]]
By example, The new instantiation of WP_query in a WP default ''Recent
Posts WIdget'' in sidebar don't interfere with a query_posts() inserted in
the '''wp''' or '''wp_head''' 'action' filters for the home page or
others.[[BR]]
Can you target the modifications (inside query.php and inside default-
widgets.php) to milestone 2.9.3 ?[[BR]]
Hi filosofo, I agree, it is not really a loop in loop as described with
template tags but remember that the results of the main query are
available inside global $wp_query and $wp_the_query. And the instantation
can use or share objects of these former globals.[[BR]]
Best regards[[BR]]
Michel of [http://dev.xiligroup.com] - Europe Time
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12320#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list