SOF Certificate for DMM
CPT for Certs
if ( ! function_exists('sof_cert_posts') ) {
// Register Custom Post Type
function sof_cert_posts() {
$labels = array(
'name' => _x( 'SOF Certificates', 'Post Type General Name', 'sof_cert' ),
'singular_name' => _x( 'SOF Certificate', 'Post Type Singular Name', 'sof_cert' ),
'menu_name' => __( 'SOF Certificate', 'sof_cert' ),
'name_admin_bar' => __( 'SOF Certificate', 'sof_cert' ),
'archives' => __( 'SOF Certificate Archives', 'sof_cert' ),
'parent_item_colon' => __( 'Parent SOF Certificate:', 'sof_cert' ),
'all_items' => __( 'All SOF Certificates', 'sof_cert' ),
'add_new_item' => __( 'Add New SOF Certificate', 'sof_cert' ),
'add_new' => __( 'Add New SOF Certificate', 'sof_cert' ),
'new_item' => __( 'New SOF Certificate', 'sof_cert' ),
'edit_item' => __( 'Edit SOF Certificate', 'sof_cert' ),
'update_item' => __( 'Update SOF Certificate', 'sof_cert' ),
'view_item' => __( 'View SOF Certificate', 'sof_cert' ),
'search_items' => __( 'Search SOF Certificate', 'sof_cert' ),
'not_found' => __( 'SOF Certificate Not found', 'sof_cert' ),
'not_found_in_trash' => __( 'SOF Certificate Not found in Trash', 'sof_cert' ),
'featured_image' => __( 'SOF Certificate Featured Image', 'sof_cert' ),
'set_featured_image' => __( 'SOF Certificate Set featured image', 'sof_cert' ),
'remove_featured_image' => __( 'SOF Certificate Remove featured image', 'sof_cert' ),
'use_featured_image' => __( 'SOF Certificate Use as featured image', 'sof_cert' ),
'insert_into_item' => __( 'Insert into SOF Certificate', 'sof_cert' ),
'uploaded_to_this_item' => __( 'Uploaded to this SOF Certificate', 'sof_cert' ),
'items_list' => __( 'SOF Certificate list', 'sof_cert' ),
'items_list_navigation' => __( 'SOF Certificate list navigation', 'sof_cert' ),
'filter_items_list' => __( 'Filter SOF Certificate list', 'sof_cert' ),
);
$args = array(
'label' => __( 'SOF Certificate', 'sof_cert' ),
'description' => __( 'Custom HTML to PDF', 'sof_cert' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-learn-more',
'show_in_admin_bar' => true,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => false,
'capability_type' => 'page',
);
register_post_type( 'sof_certificate', $args );
}
add_action( 'init', 'sof_cert_posts', 0 );
}