Skip to content

Instantly share code, notes, and snippets.

@cagriuckan
Created August 14, 2016 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cagriuckan/836dcc5f6aac6212238d548a52d71647 to your computer and use it in GitHub Desktop.
Save cagriuckan/836dcc5f6aac6212238d548a52d71647 to your computer and use it in GitHub Desktop.
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'uckan' ),
);
$args = array(
'label' => __( 'product', 'uckan' ),
// Publicize supports
'supports' => array( 'title', 'editor', 'publicize', 'wpcom-markdown' ),
);
register_post_type( 'product', $args );
}
add_action( 'init', 'custom_post_type', 0 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment