[wp-hackers] is_front_page() after modifying query_posts

Otto otto at ottodestruct.com
Fri Mar 11 19:25:22 UTC 2011


On Fri, Mar 11, 2011 at 1:18 PM, Gavin Pearce <Gavin.Pearce at 3seven9.com> wrote:
> Of course this is because you've now updated the query, changing, for
> all intents and purposes, the page you're on.
>
> However ... is this really the preferred behaviour for is_front_page()?

I'd say yes, because the same behavior exists for is_everything() in that sense.

If you don't want to change what page you're on, don't use
query_posts(). You can just make a new WP_Query() instead.

-Otto


More information about the wp-hackers mailing list