Created
February 27, 2021 21:29
-
-
Save jeremyfelt/18ef1d88a978220f5333819ef50d1dc5 to your computer and use it in GitHub Desktop.
A custom post type with title support turned off
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
<?php | |
add_action( 'init', 'register_no_title_post_type', 10 ); | |
function register_no_title_post_type() { | |
register_post_type( | |
'no-title', | |
array( | |
'labels' => array( | |
'name' => 'No Title', | |
'singular_name' => 'No Title', | |
), | |
'public' => true, | |
'show_in_rest' => true, | |
'supports' => array( | |
'editor', | |
), | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment