Features
Featured content
if ( ! function_exists('features') ) {
// Register Custom Post Type
function features() {
$labels = array(
'name' => _x( 'Features', 'Post Type General Name', 'dik' ),
'singular_name' => _x( 'Feature', 'Post Type Singular Name', 'dik' ),
'menu_name' => __( 'Features', 'dik' ),
'name_admin_bar' => __( 'Features', 'dik' ),
'parent_item_colon' => __( 'Parent Feature:', 'dik' ),
'all_items' => __( 'All Feature', 'dik' ),
'add_new_item' => __( 'Add New Feature', 'dik' ),
'add_new' => __( 'Add New', 'dik' ),
'new_item' => __( 'New Feature', 'dik' ),
'edit_item' => __( 'Edit Feature', 'dik' ),
'update_item' => __( 'Update Feature', 'dik' ),
'view_item' => __( 'View Feature', 'dik' ),
'search_items' => __( 'Search Feature', 'dik' ),
'not_found' => __( 'Not found', 'dik' ),
'not_found_in_trash' => __( 'Not found in Trash', 'dik' ),
);
$args = array(
'label' => __( 'feature', 'dik' ),
'description' => __( 'Featured Content', 'dik' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
'taxonomies' => array( 'category', 'post_tag', ' feature_cat' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-exerpt-view',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'feature', $args );
}
// Hook into the 'init' action
add_action( 'init', 'features', 0 );
}