You can perform a conditional test against the current post type, like this:
if ( 'events' != get_post_type() ) {
remove_filter( 'the_content', 'wpautop' );
}
Related Posts:
- Filter by custom field in custom post type on admin page
- How can I remove the “Add New” button in my custom post type?
- Media library – Limit images to custom post type
- How to remove Filters from post admin page?
- Adding a drag and drop re-ordering from a custom post type default list [closed]
- How can I filter posts by post_parent in the admin?
- How do I filter the excerpt metabox description in admin?
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- Filter for “get_post_type_archive_link()”
- How to add a CSS class to every image in a Custom Post Type
- Filter by custom Field for Custom post type Admin Listing
- WP Admin default view mode for Custom Post Type
- Remove date and category filters when editing custom post types
- Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts
- Make the ‘all’ filter default instead of ‘mine’ in a custom post type
- Exclude custom function content from certain pages
- Filter get_categories() for taxonomy term in WordPress
- Debug output during filter execution doesn’t work
- Filter posts with ajax form and checkboxes
- Multiple post types in archives (filter?)
- Unable to filter on field on edit.php page
- Highlight nav menu terms
- Help with issues on “Adding a Taxonomy Filter to Admin List for a Custom Post Type?”
- Want to filter only parent post in admin area
- Adding posts of custom type into the main feed
- Used with meta_query in query_posts works slowly
- Filters post in admin with dropdown select, custom post type
- Admin List Dynamic Heading
- What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience
- Add $more_link_text parameter to the_excerpt()
- Custom Taxonomy breaking pages permalinks
- How do I set the link in the Custom Post Type admin menu?
- Modifying date filter on admin page for custom post type to link to custom field
- Add html to cpt main page / admin edit.php
- register_taxonomy and register_post_type does not work [closed]
- Pre_get_posts filter overwrites all search functionality
- Filter categories of posts with checkboxes
- WooCommerce product search titles only
- Custom query to filter posts that have current post as a taxonomy [closed]
- Setting proper query for multiple custom admin filters
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Append date to custom post type url slug
- Genesis filterable portfolio isotope [closed]
- How can I see a list of my Custom Post Types of the last term I was in?
- filter custom post type by meta key in dashboard
- Categories of custom taxonomy don’t show any posts
- How to add a post slug to a url?
- WordPress sort search results by custom order
- How to filter wp_list_categories output with some custom post type meta query?
- How to Filter custom post type by taxonomy?
- creat filter with wp_query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How can I made custom taxonomies relationship?
- WooCommerce sort products by the actual product width(not the shipping width)
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- Versioned Custom Post Type (Not the same as revisions)
- Filter Posts from the Main Query
- Categories filtering in new post
- How does the filter post_updated_messages work?
- Create new custom post and post category of same name
- wordpress remove views from action links in a custom post
- Filter posts by tax (dropdown) and meta value
- sortable columns for multiple custom post types not working
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- REST filters only firing when I have a param set
- Modifying WP_Title For Custom Post Type
- Filtering the_content, but still need to display the unfiltered content inside filter
- Catch and display error on save_post action
- Is possible register two archive pages for single custom post type?
- Display custom post front end filter by ACF equals current user
- custom filtering admin columns
- Ajax Post Filter | Split Taxonomy Into minPrice & maxPrice
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Query filter by value in meta_value array
- Best way to fix bad count on All | Mine | Published
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Display category filters for custom post type when category is shared by multiple post types
- Create Post Types from a XML url (Real Estate website)
- Post Click Redirect to Custom URL instead of Single Post Page
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Keep br tags from stripping
- Add filter button to custom post type in admin area
- Grouping and paging CPT events by month with custom field date
- Adding Information To All Posts Screen
- Dropdown switching subcategories portfolio
- Filter Content on all Post Types
- Sorting on Taxonomy in archive page
- Filter custom post type by tags
- Custom Search Template for Custom Post Types
- Exclude Custom Post Type from shared Custom Taxonomy
- How to filter posts by categories?
- Rewrite a filter as shortcode (or something like that) to use anywhere in CPT
- add_filter > posts_where works partially
- When Attempting to Filter Plugin Generated Content Using Filter post_type_link, Permalinks Are Not Modified
- Change CPT Edit Target Link for Admin List
- Add Custom Taxonomy Terms as CSS Classes for CPT Posts in an Elementor Loop Item Template
- Add post id to url instead of WordPress default -2 suffix
- coloring row’s background based on custom field value