سلام
من دو تا پست تایپ برای فیلم و سریال ساختم، مشکل اینه که پست هایی که در این پست تایپ ها منتشر میکنم در قسمت سرچ و ایندکس دسته بندی ها نمایش داده نمیشن، البته پست های قسمت سریال در قسمت سرچ میان.... اینم کد ها:
من دو تا پست تایپ برای فیلم و سریال ساختم، مشکل اینه که پست هایی که در این پست تایپ ها منتشر میکنم در قسمت سرچ و ایندکس دسته بندی ها نمایش داده نمیشن، البته پست های قسمت سریال در قسمت سرچ میان.... اینم کد ها:
کد:
function wpp_custom_post_type_movie() { $labels = array( 'name' => __( 'movie', 'record' ), 'singular_name' => __( 'movie', 'record' ), 'menu_name' => __( 'movie', 'record' ), 'parent_item_colon' => __( 'Parent Item:', 'record' ), 'all_items' => __( 'all movies', 'record' ), 'view_item' => __( 'View Item', 'record' ), 'add_new_item' => __( 'Add New Item', 'record' ), 'add_new' => __( 'add movie', 'record' ), 'edit_item' => __( 'Edit Item', 'record' ), 'update_item' => __( 'Update Item', 'record' ), 'search_items' => __( 'Search Item', 'record' ), 'not_found' => __( 'Not found', 'record' ), 'not_found_in_trash' => __( 'Not found in Trash', 'record' ), ); $args = array( 'label' => __( 'movie', 'record' ), 'description' => __( 'movie description', 'record' ), 'labels' => $labels, 'supports' => array( 'title', 'comments', 'thumbnail'), 'taxonomies' => array( 'category', 'post_tag' , 'movie-quality' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'movie', $args );}add_action( 'init', 'wpp_custom_post_type_movie', 0 ); function wpp_custom_post_type_tvseries() { $labels = array( 'name' => __( 'tv-series', 'record' ), 'singular_name' => __( 'tv-series', 'record' ), 'menu_name' => __( 'tv-series', 'record' ), 'parent_item_colon' => __( 'Parent Item:', 'record' ), 'all_items' => __( 'all tv-series', 'record' ), 'view_item' => __( 'View Item', 'record' ), 'add_new_item' => __( 'Add New Item', 'record' ), 'add_new' => __( 'add tv-series', 'record' ), 'edit_item' => __( 'Edit Item', 'record' ), 'update_item' => __( 'Update Item', 'record' ), 'search_items' => __( 'Search Item', 'record' ), 'not_found' => __( 'Not found', 'record' ), 'not_found_in_trash' => __( 'Not found in Trash', 'record' ), ); $args = array( 'label' => __( 'tvseries', 'record' ), 'description' => __( 'tv-series description', 'record' ), 'labels' => $labels, 'supports' => array( 'title', 'comments', 'thumbnail'), 'taxonomies' => array( 'category', 'post_tag' , 'movie-quality' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'tvseries', $args );}add_action( 'init', 'wpp_custom_post_type_tvseries', 0 );