Here you are: get_post_type()
and then if ( 'book' == get_post_type() ) ...
as per Conditional Tags > A Post Type in Codex.
Related Posts:
- Exclude custom function content from certain pages
- Conditional for a Single Post That Belongs to a Category?
- If custom taxonomy else conditional [closed]
- How can I check the rewrite slug of current post type listing page
- Conditional for single-{post-type}.php
- If Post Type equals, then display X content
- Display several random posts, but make sure a condition is met
- is_singular() not working if called via callback function of admin-ajax.php
- functions.php conditional tag only for custom post type
- Get template part based on custom taxonomy term
- If on term-page -> get the current term?
- custom post type upcoming post and past post
- changing default comment form arguments [duplicate]
- Function like in_category for custom taxonomies
- is_page_template not working as expected
- remove child post from custom post type archive
- if custom posts type exists and there are posts load script
- Need help targeting a custom post type with conditional tags
- Why would this IF statement not work? [closed]
- custom comments on specific post type
- Excluding custom post types
- Can I create a loop with multiple post types and specify different $args for each post type?
- Conditional PNG Overlay in Custom Post Type Loop Depending on Post Type
- Register widget only page is a singular of custom post type
- Is there a conditional tag to determine whether the post is _any_ custom post type?
- Conditional Query of Custom Post Type and custom taxonomy
- How to run filter only on custom post type edit screen
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Conditional for Parent & Child Single.php?
- Search filter triggered & sort by custom post type
- How to show only the most recent post on my custom post type archive?
- Dynamically output a class to an anchor tag depending on what tag is chosen
- Conditional Tags for specific category of custom posts
- Move Genesis Single Page/Single Post Title
- Check IF single OR multiple custom data has been entered
- How to check if post/page or taxonomy post is published by admin
- TinyMCE Buttons on Certain Post Type
- Display message if no posts in Custom Post Type loop
- Showing taxonomy terms on custom post type
- Check if custom post is a parent?
- Redirect to URL if x number of days passed
- comments hooks on custom post type
- Conditional Statements
- If tag exists, then echo once
- Show specific content on parent custom post type and all children
- Use conditionals with wp_enqueue_style to attach stylesheet according to post type displayed
- Checking for custom field in admin pages
- I’m trying to create an if statement that will only display my button link for tickets if its under ‘admission-event’… what is wrong with my code?
- How to add custom PHP code in post header?
- $_SESSION Not working after X amount of page views
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- conditional based upon the count of current user’s published custom posts
- Display content based on Author Custom Post type
- Custom metabox fields not saving when limited to a certain CPT
- Can not hook into custom post type template with: is_page() conditional?
- Diffrent search templates for different post types
- Conditional Tags If Custom Post Parent & Child?
- Custom Post Query Combined with Conditional Tags
- Loop to pull content from parent element in custom post type [duplicate]
- Conditional statement checking two conditions for CPT and Custom Taxonomy [closed]
- strange conditional tag behaviour [duplicate]
- How to set up a echo? [closed]
- Custom post type is_singular condtional not working when managing sidebar display
- Adding an Archive of Posts to the Navigation Menu in WordPress 3.0
- Possible to change the URL for the regular post type without affecting the URL of other custom post types?
- Is there a way to override the tag specified in header.php?
- how to get posts by custom post type then display Custom fields?
- Having a custom post slug that clashes with an existing directory
- wp_get_object_terms(): count relative to passed IDs?
- Debug whats going on inside a function called from AJAX
- Limiting number of custom posts shown on taxonomy page
- 404 error on custom post type
- Display CPT description on archive.php pages for all CPT
- Front End submission with meta key
- Custom post-type for page header images
- Using wordpress template tags within an array
- How to use the post_title of custom post type as taxonomy
- Add acf field in title (admin table)
- Why can’t my admin account manage attachments on a custom post type with a unique capability type?
- Single posts for one CPT UI post type are 404s
- How to create custom post type with custom taxonomy?
- Create custom post type (using pods) then convert existing pages to custom post type?
- Page builder plugins Vs advanced custom field and Custom Post type [closed]
- Show custom post type inside a custom post type
- WP API Response does not show my registered metadata
- Creating alternate meta box context locations
- Get posts by category name
- Custom meta box in custom post type not working
- Problem while filtering by ‘category_name’
- Hide directly viewing content for custom post type
- How to implement very unusual wordpress routing structure?
- multiple URLS for the same page
- Change custom post taxonomy values from front-end
- Wp Query sort order from custom MetaBox
- Custom Post Types UI paragraph style
- How to manage a custom post type archive as a page?
- Limit number of posts under a post type?
- Why is my custom form saving with ‘autodraft’ as title and slug?
- How to stream a linked file in WordPress
- Error 403 when posting comments to a custom post type from a different page