Akce
if ( ! function_exists('akce_post_type') ) {
// Register Custom Post Type
function akce_post_type() {
$labels = array(
'name' => _x( 'Akce', 'Post Type General Name', 'customify' ),
'singular_name' => _x( 'Akce', 'Post Type Singular Name', 'customify' ),
'menu_name' => __( 'Akce', 'customify' ),
'name_admin_bar' => __( 'Akce', 'customify' ),
'archives' => __( 'Archiv akcí', 'customify' ),
'attributes' => __( 'Atributy akce', 'customify' ),
'parent_item_colon' => __( 'Nadřazená položka:', 'customify' ),
'all_items' => __( 'Všechny akce', 'customify' ),
'add_new_item' => __( 'Přidat novou akci', 'customify' ),
'add_new' => __( 'Přidat nové', 'customify' ),
'new_item' => __( 'Nová položka', 'customify' ),
'edit_item' => __( 'Upravit akci', 'customify' ),
'update_item' => __( 'Upravit akci', 'customify' ),
'view_item' => __( 'Zobrazit akci', 'customify' ),
'view_items' => __( 'Zobrazit akce', 'customify' ),
'search_items' => __( 'Hledat akci', 'customify' ),
'not_found' => __( 'Nenalezeno', 'customify' ),
'not_found_in_trash' => __( 'Nenalezeno v koši', 'customify' ),
'featured_image' => __( 'Náhledový obrázek', 'customify' ),
'set_featured_image' => __( 'Zvolit náhledový obrázek', 'customify' ),
'remove_featured_image' => __( 'Odstranit náhledový obrázek', 'customify' ),
'use_featured_image' => __( 'Nastavit jako náhledový obrázek', 'customify' ),
'insert_into_item' => __( 'Vložit do položky', 'customify' ),
'uploaded_to_this_item' => __( 'Nahráno do této položky', 'customify' ),
'items_list' => __( 'Seznam položek', 'customify' ),
'items_list_navigation' => __( 'Navigace seznamu položek', 'customify' ),
'filter_items_list' => __( 'Filtrovat seznam položek', 'customify' ),
);
$args = array(
'label' => __( 'Akce', 'customify' ),
'description' => __( 'Akce', 'customify' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'taxonomies' => array( 'akce' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-calendar-alt',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'akce',
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'akce', $args );
}
add_action( 'init', 'akce_post_type', 0 );
}