[wp-trac] Re: [WordPress Trac] #9425: The various $is_* variables in
$WP_Query should only be set on the very first query call. (was:
is_home returns false when specifying included categories only)
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 3 00:13:19 GMT 2009
#9425: The various $is_* variables in $WP_Query should only be set on the very
first query call.
--------------------------------------+-------------------------------------
Reporter: mtg169 | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 2.8
Component: General | Version: 2.7.1
Severity: major | Resolution:
Keywords: is_home, query.php, cat= |
--------------------------------------+-------------------------------------
Changes (by Denis-de-Bernardy):
* status: closed => reopened
* severity: normal => major
* priority: normal => high
* milestone: Unassigned => 2.8
* resolution: wontfix =>
Comment:
I disagree. I ran into this one myself. For what it's worth, my conclusion
at the time was that I should avoid the WP API and its built-in widgets at
all costs. Because they were completely broken.
It has improved since, but this is one of those areas where it still needs
improvements.
The fact of the matter is that the poor API and the poor documentation has
led theme developers to actually use functions such as the above. They
inconveniently reset the "true" query's internal variables, and you can
then get is_category() to answer true when is_home() should and what not.
The various $is_* variables in $WP_Query should only be set on the very
first query call. Not on subsequent ones.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9425#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list