Andrew Nacin: WP_Query / WordPress In-depth
An in-depth presentation about WP_Query for theme and plugin developers. In-depth Q&A at the end.
Comments
One response to “Andrew Nacin: WP_Query / WordPress In-depth”
-
Thanks so much for this. The slide 17:58 into this presentation fixed a query modification that worked fine on my desktop theme but when used on the Jetpack mobile theme messed up a secondary query/loop I had in a sidebar widget. Still not sure why $wp_the_query === $query should make such a difference, but using the following code did what I wanted to, without breaking the separate loop I had in the sidebar.
global $wp_the_query;
if ( jetpackme_is_mobile() && $wp_the_query === $query && $query->is_home() ) {
$query -> set( ‘cat’, ‘-8’ );
}
Thanks again.
Video details
Published
March 15, 2013
Tags

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Leave a Reply