Opened 9 years ago
Closed 8 years ago
#35810 closed enhancement (wontfix)
New function: `is_post_type`
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
I think that helpful will be function:
<?php if(is_post_type('CPT')) echo 'true'; else {echo 'false';}
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Why is
is_post_type( 'abc' )
better than'abc' === get_post_type()
?I don't really see a benefit here. People could even confuse it with
is_post_type_archive()