[wp-trac] [WordPress Trac] #12588: Add function to check if current page is a custom post type

WordPress Trac wp-trac at lists.automattic.com
Sat May 8 11:23:33 UTC 2010


#12588: Add function to check if current page is a custom post type
----------------------------+-----------------------------------------------
 Reporter:  sirzooro        |        Owner:  nacin   
     Type:  defect (bug)    |       Status:  reopened
 Priority:  normal          |    Milestone:  3.0     
Component:  Administration  |      Version:  3.0     
 Severity:  normal          |   Resolution:          
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------

Comment(by sirzooro):

 I agree, new approach is much better.

 BTW, please make sure `is_post_of_type()` will return `false` when called
 from non-post pages (e.g. home page, category or date archive). I am going
 to test this within few next days and will let you know if there are any
 issues.

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


More information about the wp-trac mailing list