Created
March 2, 2020 05:01
-
-
Save tanjimahmmed/0aa1ee6f47e3c3fee555168b7caa490e to your computer and use it in GitHub Desktop.
Register custom post
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
add_action( 'init', 'my_theme_custom_post' ); | |
function my_theme_custom_post() { | |
register_post_type( 'cpt', | |
array( | |
'labels' => array( | |
'name' => __( 'CPTs' ), | |
'singular_name' => __( 'CPT' ) | |
), | |
'supports' => array('title', 'editor', 'custom-fields', 'thumbnail', 'page-attributes'), | |
'public' => true | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment