You would need to use WordPress Conditional Tags to query if this page is the custom post type you are wanting to target and then if it is remove shortcode.
Untested but you can try this:
function remove_shortcodes( $content ) {
if ( get_post_type() == 'post-type-name' ) {
return strip_shortcodes( $content );
}
else
return $content;
}
add_filter( 'the_content', 'remove_shortcodes' );
Related Posts:
- Where to put my code: plugin or functions.php?
- How to set a default format for a custom post type?
- Create a shortcode to display custom post types with a specific taxonomy
- How do I add a new custom post format?
- Display custom post type with shortcode
- Add Content to Page without shortcodes
- Custom Post Formats for Custom Post Types
- Custom post types vs post formats : future-proofing – is one less “future proof” than another?
- Different post format options per custom post type?
- How can I fix those issues generated by the Themecheck plugin
- How can I add dropdown widget/box to admin post page?
- Shortcode Displaying Custom Post Types
- WordPress Custom Shortcode Conflicting with Media Library
- Using shortcodes to parse POST request (containing the data from a front-end form)
- Custom Select Query with Custom Post Types
- How can i list custom post type categories?
- IF statement in a do_shortcode
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Generate Shortcodes by Taxonomy
- Apply post formats to a specific post type only?
- How would I create a shortcode to display a custom post within a page or regular post?
- Is it possible to create a shortcode that will query a post based on taxonomies?
- WP_Query is printing out only one post when posts_per_page is set to multiple
- Get custom posts with certain ids in a custom loop using a shortcode
- Custom Post Type Loop within Shortcode
- Shortcode insertion in tab
- Shortcode doesn’t display in custom post type
- Is possible to add post-formats to custom-post-type?
- Add category attribute to custom shortcode
- WordPress As A Shared Items Collection
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- How to create shortcode to display custom field value on a custom post type
- How to enable shortcodes in a custom post type?
- Get custom fields from a custom post type with a shortcode
- Shortcode for display posts in wp-editor
- Display Recently Added Custom Post Types with Custom Taxonomy Shortcode
- WordPress export tool doesn’t export post-format value of custom post type?
- Registering different Post Formats for Blog Post and CPT
- Get custom post type list for every category shortcode
- URL of a custom post type’s post format archive?
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How to render a custom post type template with custom fields using shortcode
- Form action/link to render a plugin in WordPress front-end
- custom post type category count shortcode
- Display Child Pages of Custom Post Type Parent Page
- Shortcode to display Staff post type based on Location post type and Specialty post type
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- Shortcode for CPT post content in a page
- Next Post links not working in custom post type shortcode
- Foreach inside shortcode not working as planned
- How can I add a filter to a particular post format?
- Is it possible to filter the display name for post formats for display in the Formats meta box?
- Can a shortcode included in post content add styles to the ?
- How to retrieve category of a post in have_post loop?
- Understanding Post Formats/Custom Post types Etc
- Checking if looped item has a parent inside a shortcode
- get_post_meta is not working inside shortcode
- the_post() is printing titles in page footer
- Archive of post format for Custom Post Type
- Why is my custom post type shown in the wrong place?
- Plugin Error on activating
- Ads below footer
- Shortcode error
- Modify shortcode to work with custom taxonomies and slugs
- Custom Info Box at end of posts?
- shortcode order for event custom post type
- Shortcodes in custom post fields without the_content()
- Shortcode display CPT Query only showing 1 post?
- CPT unsaved draft gives error 404 – when Post Formats support enabled
- Custom Post Type vs Shortcode: Which one is more performant?
- How to call Shortcode categories for custom post types?
- Using get_terms() as shortcode attribute
- adding a shortcode into a custom post type
- Nested loop called with shortcode duplicating the content above the main loop
- Add number in increment of one to DIV ID
- shortcode for recent custom type post
- Create shortcode for list of custom post titles with custom fields alongside
- Creating shortcodes with user created forms
- Navigation links to posts in current term shortcode
- How to Create Short Code Using Custom Post type
- Adding custom shortcode to page leads to page without styling
- custom post types shortode stays on top of other page contents. Is there a bug?
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- Display posts from another page on home page in wp-editor
- Shortcode in a page to display custom posts which also have a shortcode in them
- How to loop through a custom post type using a shortcode and output each element in the loop using shortcodes
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- Display page and custom post title inside shortcode
- trying to display custom post type with custom taxonomy value by shortcode can’t works [closed]
- How to separate posts by categories?
- Problem with shortcode
- strange issue with get_post_type() when using it in a shortcode in text widget
- select categories by ids/display terms only selected
- Custom Field in Page Title
- SOLVED: Shortcode to display Divi project filtered by tag in WP Query loop
- Add Shortcode functionality to a function that queries custom post type / taxonomy
- WordPress display post count for custom post type
- Display the progress of post achievement with percentage against target in wordpress dashboard