Skip to content

Instantly share code, notes, and snippets.

@kronda
Created January 24, 2014 20:41
Show Gist options
  • Save kronda/8605936 to your computer and use it in GitHub Desktop.
Save kronda/8605936 to your computer and use it in GitHub Desktop.
<?php
//* Add a custom post type
add_action( 'init', 'publication_post_type' );
function publication_post_type() {
// Publication custom post type
register_post_type( 'Publication',
array(
'labels' => array(
'name' => __( 'Publications' ),
'singular_name' => __( 'Publication' ),
),
'has_archive' => true,
'public' => true,
'show_ui' => true, // defaults to true so don't have to include
'show_in_menu' => true, // defaults to true so don't have to include
'_builtin' => false,
'rewrite' => array( 'slug' => 'publications' ),
'supports' => array( 'title', 'editor', 'genesis-seo', 'thumbnail','genesis-cpt-archives-settings' ),
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment