dziejesie_wydarzenia
if ( ! function_exists('events_post_type_function') ) {
// Register Custom Post Type
function events_post_type_function() {
$labels = array(
'name' => _x( 'Wydarzenia', 'Post Type General Name', 'dziejesie' ),
'singular_name' => _x( 'Wydarzenie', 'Post Type Singular Name', 'dziejesie' ),
'menu_name' => __( 'Wydarzenia', 'dziejesie' ),
'name_admin_bar' => __( 'Wydarzenia', 'dziejesie' ),
'parent_item_colon' => __( 'Wydarzenie:', 'dziejesie' ),
'all_items' => __( 'Wszystkie wydarzenia', 'dziejesie' ),
'add_new_item' => __( 'Dodaj wydarzenie', 'dziejesie' ),
'add_new' => __( 'Dodaj', 'dziejesie' ),
'new_item' => __( 'Nowe wydarzenie', 'dziejesie' ),
'edit_item' => __( 'Edytuj wydarzenie', 'dziejesie' ),
'update_item' => __( 'Aktualizuj', 'dziejesie' ),
'view_item' => __( 'Wyświetl wydarzenie', 'dziejesie' ),
'search_items' => __( 'Szukaj wydarzeń', 'dziejesie' ),
'not_found' => __( 'Nic tu nie ma', 'dziejesie' ),
'not_found_in_trash' => __( 'Kosz pusty', 'dziejesie' ),
);
$rewrite = array(
'slug' => 'wydarzenia',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$capabilities = array(
'edit_post' => 'edit_post',
'read_post' => 'read_posts',
'delete_post' => 'delete_post',
'edit_posts' => 'edit_posts',
'edit_others_posts' => 'edit_others_posts',
'publish_posts' => 'publish_posts',
'read_private_posts' => 'read_private_posts',
);
$args = array(
'label' => __( 'Wydarzenie', 'dziejesie' ),
'description' => __( 'Wszystkie wydarzenia w okolicy', 'dziejesie' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-calendar-alt',
'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,
'capabilities' => $capabilities,
);
register_post_type( 'events', $args );
}
add_action( 'init', 'events_post_type_function', 0 );
}