Productify: Features
if ( ! function_exists('productify_teaser_post_type') ) {
// Register Custom Post Type
function productify_teaser_post_type() {
$labels = array(
'name' => _x( 'Teaser', 'Post Type General Name', 'productify' ),
'singular_name' => _x( 'Teaser', 'Post Type Singular Name', 'productify' ),
'menu_name' => __( 'Teaser', 'productify' ),
'name_admin_bar' => __( 'Teaser', 'productify' ),
'parent_item_colon' => __( 'Parent Teaser:', 'productify' ),
'all_items' => __( 'All Teaser', 'productify' ),
'add_new_item' => __( 'Add New Teaser', 'productify' ),
'add_new' => __( 'Add New', 'productify' ),
'new_item' => __( 'New Teaser', 'productify' ),
'edit_item' => __( 'Edit Teaser', 'productify' ),
'update_item' => __( 'Update Teaser', 'productify' ),
'view_item' => __( 'View Teaser', 'productify' ),
'search_items' => __( 'Search Teaser', 'productify' ),
'not_found' => __( 'Not found', 'productify' ),
'not_found_in_trash' => __( 'Not found in Trash', 'productify' ),
);
$args = array(
'label' => __( 'teaser', 'productify' ),
'description' => __( 'Teaser', 'productify' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'revisions', 'custom-fields', 'page-attributes', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-megaphone',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'rewrite' => false,
'capability_type' => 'page',
);
register_post_type( 'teaser', $args );
}
// Hook into the 'init' action
add_action( 'init', 'productify_teaser_post_type', 0 );
}