Not with Gutenberg (block editor)
-
It works, but not in block editor. If you want with block editor, easiest is using an update alternative called “Conditionally display featured image on singular posts and pages”. Alternatively, tell GitHub Copilot to make it work with block editor and then it adds a piece to the beginning of index.php (not tested):
// Register meta for REST API compatibility (Gutenberg)
add_action( ‘init’, function() {
register_post_meta( ”, ‘_hide_featured’, array(
‘show_in_rest’ => true,
‘single’ => true,
‘type’ => ‘string’,
‘auth_callback’ => function() { return current_user_can( ‘edit_posts’ ); }
) );
} );
The topic ‘Not with Gutenberg (block editor)’ is closed to new replies.