You could for example use in_array
. Like so,
if ( ! in_array( $post_type, array( 'region', 'region2', 'region3' ) ) ) {
// something
}
Related Posts:
- Can I assign a template to a custom post type?
- How to remove “read more” link from custom post type excerpt
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Can you make a custom metabox field be required to save a new post?
- How can I rewrite URLs to pass taxonomy and post type values to the query?
- Best Way to Create a List of Musician Gigs in WordPress
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Adding %author% in custom post type URL structure?
- Problem excluding category from get_next_post
- Posts in Multiple Columns and Rows with one single loop
- Hide child term posts on parent term pages
- Custom field being erased after autosave
- Want to filter only parent post in admin area
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Display custom taxonomy as dropdown list
- WordPress is executing URL in code when called via wp_mail()
- Remove current_page_parent from posts page link in WordPress nav menu
- How to display the categories of the post? (custom post type)
- Query to change custom post type with specific category
- How to use custom fields to enable sticky posts on custom post types?
- allow edit of custom post type but not regular posts?
- Pagination problem
- Custom meta fields for specific custom type only
- Display different custom post type each week
- How to add custom post type under option page
- register_taxonomy and register_post_type does not work [closed]
- Custom post type and body_class: Remove “blog” class
- How do I create a form to search a custom post type
- Setting posts per page in query_posts
- How to insert content from another Custom Post type into Post?
- Query var removed after rewrite
- Adding custom tables to WordPress
- Insert HTML inside link in a walker
- How do I order multiple custom post types in the same menu position ( menu_position = 20 – below Pages)?
- Getting posts under the custom post type ui category
- Add archive slug to default post post type
- Custom Post type and permalink settings
- How to order separated Custom Post Search results
- Set URL link to featured image of custom post type
- Custom taxonomy and custom post type – wrong permalinks and template
- What to and how to proceed with CPT to make DB small and efficient?
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Custom taxonomy returns 404
- Rewrite CPT child page URL to support query var
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- PHP Code to Display Term URL & Name of a Post Under a Custom Post Type
- Problems wp_insert_post and save_posts filter
- Unable to link categories to custom post type using standard function
- Cant get paginations on single.php to work with my custom post types
- Is it possible to show multiple (custom) post types at the wp homepage only by using pluging code?
- Loop to display custom post type from a custom Taxonomy
- the_content(); of custom post type treated as an array or object
- Saving data for different custom posts
- Getting a custom post’s custom field based on another custom post’s custom field select
- Inserting custom fields into single.php
- Check if custom post is a parent?
- Get all post from a post type
- A faster way to query custom post types with multiple conditions?
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- $wpdb is queried but results don’t show
- How to query custom post types with multiple keys?
- CPT permalinks Rewrite
- Redirect Existing Post to CPT
- Grouping custom wordpress post types by acf value
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- What is the best way to structure posts for the same event happening in different years?
- Creating a custom post type upon registration for a specific user role
- WordPress Post ID overwritten when I create a new post?
- Show parent category and subcategory once in while loop
- I cannot display custom posts in custom taxonomy
- Publish metabox postition?
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- Allow duplicate permalinks slugs for custom posts by different authors
- How to check if a new private custom post type is created?
- Custom taxonomy with custom post type template not showing
- Custom 404 redirect for a luddite
- One-Time Script TimeOut for Large Data
- How can you use a page for a custom post type?
- Pagination functions won’t work
- Collect custom post in a calendar
- CPT Efficient way to display posts from different categories with custom query
- Custom post type and google visibility
- How to create default taxonomy term for a custom post type? [duplicate]
- Extensive search filtering and results->PDF in the front-end
- title tag for custom post type remove taxonomy name from title tag
- Posts without featured image using other post’s featured image
- How to add a custom post type in child theme? (WordPress > 3.0)
- Displaying wp post categories into my custom metabox
- Advanced search form with filters for custom taxonomies and custom fields
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- current_page_item and custom post type?
- Pagination not working
- Issues on saving data from CPT select metabox
- How can I get user URL by id
- How to display custom message for (Genesis) featured posts if no posts
- CPT Archive Pagination – Page not found
- Is there a function that replace category name with a icon?
- Custom Post Type urls not working
- Just the First Metabox what saves the data!