How do I add text or message above the featured image area in gutenberg for a CPT
Try this: function wrapPostFeaturedImage( OriginalComponent ) { const currentPostType = wp.data.select( ‘core/editor’ ).getCurrentPostType(); // Do nothing, if the post type is not rt_brands. if ( ‘rt_brands’ !== currentPostType ) { return OriginalComponent; } return function( props ) { // Your code here. }; } You can also: Conditionally add your filter: // Check if the … Read more