Kafane
if ( ! function_exists('kafane_post_type') ) {
// Register Custom Post Type
function kafane_post_type() {
$labels = array(
'name' => _x( 'Kafane', 'Post Type General Name', 'mojakafana' ),
'singular_name' => _x( 'Kafana', 'Post Type Singular Name', 'mojakafana' ),
'menu_name' => __( 'Kafane', 'mojakafana' ),
'name_admin_bar' => __( 'Post Type', 'mojakafana' ),
'parent_item_colon' => __( 'Parent Item:', 'mojakafana' ),
'all_items' => __( 'All Items', 'mojakafana' ),
'add_new_item' => __( 'Add New Item', 'mojakafana' ),
'add_new' => __( 'Add New', 'mojakafana' ),
'new_item' => __( 'New Item', 'mojakafana' ),
'edit_item' => __( 'Edit Item', 'mojakafana' ),
'update_item' => __( 'Update Item', 'mojakafana' ),
'view_item' => __( 'View Item', 'mojakafana' ),
'search_items' => __( 'Search Item', 'mojakafana' ),
'not_found' => __( 'Not found', 'mojakafana' ),
'not_found_in_trash' => __( 'Not found in Trash', 'mojakafana' ),
);
$rewrite = array(
'slug' => 'kafane',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'kafane', 'mojakafana' ),
'description' => __( 'Kafane u zemlji Srbiji', 'mojakafana' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'grad' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'kafane', $args );
}
// Hook into the 'init' action
add_action( 'init', 'kafane_post_type', 0 );
}