Skip to content

Instantly share code, notes, and snippets.

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 feliciaceballos/9d5e599d80e4ff50988f4d3c99adec1b to your computer and use it in GitHub Desktop.
Save feliciaceballos/9d5e599d80e4ff50988f4d3c99adec1b to your computer and use it in GitHub Desktop.
Registering Custom Post Type in Piklist
<?php
add_filter('piklist_post_types', 'piklist_demo_post_types');
function piklist_demo_post_types($post_types)
{
$post_types['piklist_demo'] = array(
'labels' => piklist('post_type_labels', 'Piklist Demo')
,'title' => __('Enter Custom Title')
,'public' => true
,'rewrite' => array(
'slug' => 'piklist-demo'
)
,'capability_type' => 'post'
,'edit_columns' => array(
'title' => __('Order Number')
,'author' => __('customer')
)
,'hide_post_row_actions' => array(
'trash'
,'edit'
,'quick-edit'
)
,'hide_meta_box' => array(
'slug'
,'author'
)
,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png')
,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png')
,'admin_body_class' => array (
'piklist-demonstration'
,'piklist-sample'
)
,'status' => array(
'draft' => array(
'label' => 'New Order'
)
,'estimate' => array(
'label' => 'Request for Estimate'
)
,'quoted' => array(
'label' => 'Quoted'
)
)
);
return $post_types;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment