Conditionally custom post type url rewrite

Yes it is possible. One part of my question is answered here and full code I will type here. I have larger function wich checkes post taxanomy (in this case custom categories for custom post type). Then we check is there particular taxonomy and we change URL structure. add_filter(‘post_type_link’, ‘replace_link’, 1, 3); function replace_link( $link, … Read more

Add CPT as subpage under custom page

You should be able to provide the slug of your top level page (admin.php?page=my_page) when registering your CPT(s): register_post_type( ‘matches’, array( ‘labels’ => array( ‘name’ => __( ‘Matches’ ), ‘singular_name’ => __( ‘Match’ ) ), ‘public’ => true, ‘has_archive’ => true, // Add your page slug to ‘show_in_menu’ ‘show_in_menu’ => ‘admin.php?page=my_page’ ) );