0

I have custom post type and i want to get comments from it.

I put "comments" in support array but i still get comments are closed in single page

here is my code :

function tours_pt() {

    $labels = array(
        'name'               => _x( 'تور ها', '', 'tours' ),
        'singular_name'      => _x( 'تور', '', 'tours' ),
        'menu_name'          => _x( 'تور ها', 'admin menu', 'tours' ),
        'name_admin_bar'     => _x( 'تور', '', 'tours' ),
        'add_new'            => _x( 'تور جدید', '', 'tours' ),
        'add_new_item'       => __( 'تور جدید', 'tours' ),
        'new_item'           => __( 'تور جدید', 'tours' ),
        'edit_item'          => __( 'ویرایش تور', 'tours' ),
        'view_item'          => __( 'نمایش تور', 'tours' ),
        'all_items'          => __( 'همه تور ها', 'tours' ),
        'search_items'       => __( 'جستجو در تور ها', 'tours' ),
        'parent_item_colon'  => __( 'زیر شاخه ها :', 'tours' ),
        'not_found'          => __( 'تور پیدا نشد.', 'tours' ),
        'not_found_in_trash' => __( 'تور در زباله دان پیدا نشد.', 'tours' )
    );

    $args = array(
        'labels'             => $labels,
        'description'        => __( 'توضیحات', 'tours' ),
        'menu_icon'          => 'dashicons-palmtree',
        'public'             => true,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => array( 'slug' => 'tours' ),
        'capability_type'    => 'post',
        'has_archive'        => true,
        'hierarchical'       => false,
        'menu_position'      => 63,
        'supports' => array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail', 'comments' ),
    );


    register_post_type( 'tours', $args );

}
4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.