[wp-trac] [WordPress Trac] #16312: is_category() returns false while in index

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 22 12:51:50 UTC 2011


#16312: is_category() returns false while in index
----------------------------+-----------------------------
 Reporter:  FrancescoRizzi  |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  Future Release
Component:  Query           |     Version:  3.0.4
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |
----------------------------+-----------------------------

Comment (by FrancescoRizzi):

 Replying to [comment:4 nacin]:
 > I don't see the documentation issue here, to be honest. The category
 doesn't exist, so the request will 404 and the various flags will all be
 false, except for is_404. Same goes for pages, posts, really anything
 queryable.

 I think the issue is that the inline doc don't hint at the actual
 behaviour in this scenario
 {{{
 Whether current page query contains a category name or given category
 name.
 }}}
 Is not the same as
 {{{
 Whether the current page query contains a category name, or given category
 name, and (if so) whether the category exists.
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16312#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list