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

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 22 12:55:03 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:3 SergeyBiryukov]:
 > Replying to [ticket:16312 FrancescoRizzi]:
 > > Then, WP calls index.php instead of (as one may expect) category.php -
 which may be debatable.
 > Actually a 404 template is used here (same for non-existing posts,
 pages, tags). According to Template Hierarchy, it can be `index.php` if
 `404.php` doesn't exist in your theme.

 That makes sense - thanks for explaining that bit of mystery to me. And to
 confirm: I did not have a 404.php template in my scenario.

 > If we decide to update the inline docs, I guess we also need to include
 that explanation
 > for all appropriate `is_*()` functions for consistency.

 Agreed (at least, where applicable)

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


More information about the wp-trac mailing list