Skip to content

Instantly share code, notes, and snippets.

@cosmocanuck
Last active December 31, 2015 09:19
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 cosmocanuck/7966275 to your computer and use it in GitHub Desktop.
Save cosmocanuck/7966275 to your computer and use it in GitHub Desktop.
Code I'm using to add custom post type
add_filter('piklist_post_types', 'adaptive_post_type');
function adaptive_post_type($post_types)
{
$post_types['e2s_adaptive'] = array(
'labels' => piklist('post_type_labels', 'Adaptive Resource'),
'title' => __('Enter Custom Title'),
'public' => true,
'capability_type' => 'post',
'rewrite' => array(
'slug' => 'e2s_adaptive'
),
'supports' => array(
'author',
'revisions'
)
);
return $post_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment