Příspěvky blogu
// Register Custom Post Type
function custom_post_type_blog() {
$labels = array(
'name' => _x( 'Přípěvky v blogu', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Přípěvek v blogu', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Blog', 'text_domain' ),
'name_admin_bar' => __( 'Příspěvky blogů', 'text_domain' ),
'archives' => __( 'Archiv příspěvků', 'text_domain' ),
'attributes' => __( 'Atributy', 'text_domain' ),
'parent_item_colon' => __( 'Nadřazený příspěvek:', 'text_domain' ),
'all_items' => __( 'Všechny příspěvky', 'text_domain' ),
'add_new_item' => __( 'Přidat nový příspěvek', 'text_domain' ),
'add_new' => __( 'Přidat nový příspěvek', 'text_domain' ),
'new_item' => __( 'Nový příspěvek', 'text_domain' ),
'edit_item' => __( 'Upravit příspěvek', 'text_domain' ),
'update_item' => __( 'Obnovit příspěvek', 'text_domain' ),
'view_item' => __( 'Zobrazit příspěvek', 'text_domain' ),
'view_items' => __( 'Zobrazit příspěvky', 'text_domain' ),
'search_items' => __( 'Najít položku', 'text_domain' ),
'not_found' => __( 'Nenalezeno', 'text_domain' ),
'not_found_in_trash' => __( 'Nenalezeno v koši', 'text_domain' ),
'featured_image' => __( 'Náhledový obrázek', 'text_domain' ),
'set_featured_image' => __( 'Zvolit náhled', 'text_domain' ),
'remove_featured_image' => __( 'Odstranit náhled', 'text_domain' ),
'use_featured_image' => __( 'Použít jako náhled', 'text_domain' ),
'insert_into_item' => __( 'Vložit', 'text_domain' ),
'uploaded_to_this_item' => __( 'Nahráno k této položce', 'text_domain' ),
'items_list' => __( 'Seznam položek', 'text_domain' ),
'items_list_navigation' => __( 'Navigace v seznamu položek', 'text_domain' ),
'filter_items_list' => __( 'Filtrovat seznam položek', 'text_domain' ),
);
$args = array(
'label' => __( 'Přípěvek v blogu', 'text_domain' ),
'description' => __( 'Příspěvky jednotlivých bloggerů', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
'taxonomies' => array( 'category', 'post_tag', 'blog_taxonomy' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-aside',
'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' => 'post',
);
register_post_type( 'post_type_blog', $args );
}
add_action( 'init', 'custom_post_type_blog', 0 );