[wp-hackers] pre_get_posts problem
scribu
scribu at gmail.com
Wed Jul 21 20:11:40 UTC 2010
On Wed, Jul 21, 2010 at 8:14 AM, Andrew Nacin <wp at andrewnacin.com> wrote:
> This is one of the dangers/pitfalls of using pre_get_posts. It seems to be
> recommended often for some reason when dealing with custom post types, but
> it is much better to modify the request itself, versus any old get_posts or
> WP_Query call.
>
I think the reason it's recommended often is that people usually start
looking into the WP_Query class first and 'pre_get_posts' looks like the
right place to hook into.
--
http://scribu.net
More information about the wp-hackers
mailing list