Last active
December 11, 2015 18:59
-
-
Save nateluzod/4645900 to your computer and use it in GitHub Desktop.
Create custom post type in WordPress. This needs to go in the functions.php of your theme file.
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', 'create_type' ); | |
function create_type() { | |
register_post_type( 'type', | |
array( | |
'labels' => array( | |
'name' => __( 'Types' ), | |
'singular_name' => __( 'Type' ) | |
), | |
'public' => true, | |
'has_archive' => true, | |
'supports' => array( 'title', 'editor', 'thumbnail' ), | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment