[wp-hackers] bug in is_home in query filters for custom post landing pages?
otto at ottodestruct.com
Tue Jun 15 14:12:07 UTC 2010
Why not just modify is home to accept an optional post_type parameter instead?
if (is_home('whatever')) ...
Then make it so no parameter (or blank) checks for the main home only,
not for the post type homes.
On Tue, Jun 15, 2010 at 7:53 AM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> Perhaps we should introduce is_[slug]_home() as well. Thus: is_post_home(), is_member_home(), and so forth. Shouldn't be too hard to knock together a patch that calls something like:
> do_action( 'is_' . $post_type_slug . '_home' );
> right after "is_home" is called. (Yes, I think it should be *after* the generic.)
> On Jun 14, 2010, at 6:59 PM, Jeff Waugh wrote:
>> <quote who="Simon Blackbourn">
>>> i've just installed RC3 and it seems that all the post query filters
>>> (posts_join, posts_where, posts_orderby & posts_fields) are seeing
>>> is_home() as true for custom post type landing pages, even when they're
>>> not the home page.
>> That warrants some consideration (or a swoop of the axe from an opinionated
>> core committer), but in this case, shouldn't you be using is_front_page()?
>> (or do you want this to run even when showing the "blog" page when a custom
>> front page is set?)
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers