Skip to content

Instantly share code, notes, and snippets.

@bentedder
Created February 1, 2013 01:37
Show Gist options
  • Save bentedder/4688461 to your computer and use it in GitHub Desktop.
Save bentedder/4688461 to your computer and use it in GitHub Desktop.
/** Register code custom post type
from http://www.briangardner.com/custom-post-types/
*/
add_action( 'init', 'code_post_type' );
function code_post_type() {
register_post_type( 'code',
array(
'labels' => array(
'name' => __( 'Code' ),
'singular_name' => __( 'Code Snippets' ),
),
'has_archive' => true,
'public' => true,
'taxonomies' => array('category', 'post_tag'),
'rewrite' => array( 'slug' => 'code' ),
'supports' => array( 'title', 'editor', 'genesis-seo' ),
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment