Created
February 7, 2023 15:15
-
-
Save nathaningram/2a256edb0702d23e32cccf5cc133b725 to your computer and use it in GitHub Desktop.
Convert to Block Support Per Post Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds Convert to Block Support Per Post Type | |
// Used along with Convert to Blocks plugin by 10up | |
// https://wordpress.org/plugins/convert-to-blocks/ | |
add_filter( 'post_type_supports_convert_to_blocks', function( $supports, $post_type ) { | |
if ( $post_type === 'YOUR_CPT_SLUG_HERE' ) { | |
return true; | |
} | |
return $supports; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment