Custom design for register_post_type and theyr
-
Good day,
I have registered custom post type (“register_post_type”) and in it i have “register_taxonomy” like category.
When user click in the menu on (“register_taxonomy”) category, he view only main loop, how can I make loop for this category?
My code:
<?php add_action('init', 'custom_post_type_onody'); function custom_post_type_onody() { $custom_slug = get_option('slug') != '' ? get_option('slug') : 'work'; $args = array( 'labels' => array( 'name' => __('Práca', 'simple-onody'), 'singular_name' => __('Pracovné ponuky', 'simple-onody'), 'add_new' => __('Prida? ponuku', 'simple-onody'), 'add_new_item' => __('Prida? ponuku', 'simple-onody'), 'new_item' => __('Prida? ponuku', 'simple-onody'), 'view_item' => __('Zobrazi? ponuku', 'simple-onody'), 'search_items' => __('Vyhlada? ponuku', 'simple-onody'), 'edit_item' => __('Upravi? ponuku', 'simple-onody'), 'all_items' => __('V?etky ponuky', 'simple-onody'), 'not_found' => __('?iadne ponuky sa nena?li', 'simple-onody'), 'not_found_in_trash' => __('?iadne ponuky sa nena?li v ko?i', 'simple-onody') ), 'taxonomies' => array('custom-categories'), 'public' => true, 'show_ui' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'rewrite' => array('slug' => __($custom_slug)), 'hierarchical' => false, 'menu_position' => 20, 'supports' => array('title', 'editor', 'comments', 'thumbnail') ); /** create categories (taxonomy) */ register_taxonomy('custom-categories', 'project', array( 'hierarchical' => true, 'show_ui' => true, 'rewrite' => array('slug' => __($custom_slug . '/stat')), 'labels' => array( 'name' => __('?táty', 'simple-onody'), 'singular_name' => __('Ponky v ?tátoch', 'simple-onody'), 'search_items' => __('H?ada? ponuku v ?tátoch', 'simple-onody'), 'popular_items' => __('Ob?úbené ?táty', 'simple-onody'), 'all_items' => __('V?etky ?táty', 'simple-onody'), 'parent_item' => __('Nadradeny ?tát (nepovinné!)', 'simple-onody'), 'parent_item_colon' => __('Nadradeny ?tát (nepovinné!)', 'simple-onody'), 'edit_item' => __('Upravi? ?táty', 'simple-onody'), 'update_item' => __('Prida? ?tát', 'simple-onody'), 'add_new_item' => __('Prida? novy ?tát', 'simple-onody'), 'new_item_name' => __('Novy ?tát', 'simple-onody'), 'separate_items_with_commas' => __('Separate Categories with commas', 'simple-onody'), 'add_or_remove_items' => __('Prida? alebo Odstráni? ?tát', 'simple-onody'), 'choose_from_most_used' => __('Vyberte z najpo?ívanej?ích ?tátov', 'simple-onody') ) )); /** create new custom post type */ register_post_type('work', $args); }
I am sorry but my English is poor.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom design for register_post_type and theyr’ is closed to new replies.