Habilitar exibição de categorias de Custom Post Type (Wordpress)

Đã hoàn thành Đã đăng vào Feb 27, 2016 Thanh toán khi bàn giao
Đã hoàn thành Thanh toán khi bàn giao

Criei alguns Custom Post Types e está tudo devidamente registrado. As páginas de arquivos abrem normalmente (Já usei o truque de resalvar os permalinks), mas as categorias específicas de cada Custom Post Type não são exibidas (aparece a mensagem "Página não encontrada").<br /><br />Preciso exibir as categorias (e seus respectivos posts) de cada Custom Post Type. O caminho lógico da URL não funciona (Domínio principal / Nome do Custom Post Type / Categoria do Custom Post Type). É como se as categorias não estivessem sendo reconhecidas.<br /><br />Usei esse código para criar os Custom Post Types e, como já disse, eles estão funcionando bem:<br /><br />add_action( 'init', 'create_post_type_film' );<br /><br />function create_post_type_film() {<br /><br />    $labels = array(<br />        'name' => _x('Films', 'post type general name'),<br />        'singular_name' => _x('Film', 'post type singular name'),<br />        'add_new' => _x('Add New', 'film'),<br />        'add_new_item' => __('Add New Film'),<br />        'edit_item' => __('Edit Film'),<br />        'new_item' => __('New Film'),<br />        'all_items' => __('All Films'),<br />        'view_item' => __('View Film'),<br />        'search_items' => __('Search Films'),<br />        'not_found' =>  __('No Films found'),<br />        'not_found_in_trash' => __('No Films found in Trash'),<br />        'parent_item_colon' => '',<br />        'menu_name' => 'Films'<br />    );<br />    <br />    register_post_type( 'film', array(<br />        'labels' => $labels,<br />        'public' => true,<br />        'publicly_queryable' => true,<br />        'show_ui' => true,<br />        'show_in_menu' => true,<br />        'has_archive' => 'films',<br />        'rewrite' => array(<br />         'slug' => 'films',<br />         'with_front' => false,<br />        ),<br />        'capability_type' => 'post',<br />        'has_archive' => true,<br />        'hierarchical' => false,<br />        'menu_position' => null,<br />        'supports' => array('title','editor','author','thumbnail','excerpt','comments')<br />        )<br />    );<br />    <br />    register_taxonomy( 'film_category', array( 'film' ), array(<br />        'hierarchical' => true,<br />        'label' => __( 'Film Category' ),<br />        'labels' => array( // Labels customizadas<br />        'name' => _x( 'Categories', 'taxonomy general name' ),<br />        'singular_name' => _x( 'Category', 'taxonomy singular name' ),<br />        'search_items' =>  __( 'Search Categories' ),<br />        'all_items' => __( 'All Categories' ),<br />        'parent_item' => __( 'Parent Category' ),<br />        'parent_item_colon' => __( 'Parent Category:' ),<br />        'edit_item' => __( 'Edit Category' ),<br />        'update_item' => __( 'Update Category' ),<br />        'add_new_item' => __( 'Add New Category' ),<br />        'new_item_name' => __( 'New Category Name' ),<br />        'menu_name' => __( 'Category' ),<br />    ),<br />        'show_ui' => true,<br />        'show_in_tag_cloud' => true,<br />        'query_var' => true,<br />        'rewrite' => array(<br />            'slug' => 'films/categories',<br />            'with_front' => false,<br />        ),<br />        )<br />    );<br />    <br />    register_taxonomy_for_object_type( 'tags', 'film' );<br />    <br />}

Coding Java Programming Kiến trúc phần mềm Phát triển phần mềm

ID dự án: #12429915

Về dự án

1 đề xuất Dự án từ xa Mar 28, 2016 đang mở

Được trao cho:

mestr3

Até qUE enfim apareceu o projeto aqui. Demorou mais rolou. Como o projeto já foi concluído vou setar o valor em 100 como combinamos. Mais tarde coversam os sobre as outras tarefas. Vou escrevendo mais texto para ocupa Thêm

€62 EUR trong 2 ngày
(0 Đánh Giá)
0.0