Como faço para bloquear / redirect? ‘URLs’ post_type = cpt_name ‘?

Com CPTs, eu quero bloquear o access em URL de string de consulta de ‘? Post_type = cpt_name’ e ter itens únicos disponíveis apenas em URLs regulares (/ cpt_name /).

Um exemplo do meu código atual register_cpt é:

function channel_cpt() { $labels = array( 'name' => _x( 'Channels', 'post type general name' ), 'singular_name'=> _x( 'Channel', 'post type singular name' ), 'menu_name'=> __( 'Channels' ), 'add_new' => __( 'Add new' ), 'add_new_item' => __( 'Add new Channel' ), 'all_items' => __( 'View all' ), 'edit_item' => __( 'Edit Channel' ), 'new_item' => __( 'Channel' ), 'view_item' => __( 'View Channel' ), // 'search_items' => __( 'Search Channels' ), 'not_found' => __( 'No Channels found.' ), 'not_found_in_trash'=> __( 'No Channels found in trash.' ), 'parent_item_colon' => __( 'Channel' ) ); $args = array( 'label' => __('Channel'), 'description' => __( 'Geographic channels' ), 'exclude_from_search' => false, 'has_archive' => false, 'hierarchical' => true, 'labels' => $labels, 'menu_position' => 20, 'menu_icon' => 'dashicons-megaphone', 'public' => true, 'rewrite' => array('slug' => 'programs/channels', 'with_front' => false ), 'supports' => $supports = array( 'excerpt', 'page-attributes', 'post-formats', 'revisions', ), 'taxonomies' => array( 'post_tag', 'category' ), ); register_post_type( 'channel', $args ); } add_action('init', 'channel_cpt', 0); 

Solutions Collecting From Web of "Como faço para bloquear / redirect? ‘URLs’ post_type = cpt_name ‘?"