Creating multiple pages from one custom post type entry

Could you create taxonomies for the “Student” custom post type for “Bio,” “Resume,” and “Contact”? // Register Custom Taxonomy function create_bio_taxonomy() { $labels = array( ‘name’ => _x( ‘Bios’, ‘Taxonomy General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Bio’, ‘Taxonomy Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Bio’, ‘text_domain’ ), ‘all_items’ => __( ‘All Bios’, ‘text_domain’ … Read more

Rewrite taxonomy permalink appended to CPT archive url

There are 2 possible ways to fix the issue with the term’s permalinks (which is currently using the wrong query var name – intvn-cat): Easy. Just set the 3rd parameter for add_rewrite_tag() to intervention_cat=. I.e. add_rewrite_tag( ‘%intvn-cat%’, ‘(.+)’, ‘intervention_cat=” ); This is what I would actually do – Remove the add_rewrite_tag() part in your code, … Read more

How does WordPress manage to differentiate between post and page URLs without a distinct base, and how can I replicate this functionality?

I dont know how I missed out on that while looking for aproaches, but I have a working solution now based on this answer. I modified it to check for slashes in $query->request, if there is none I first look for my custom post type (get_posts() with’slug’ => $query->request). If no post is found I … Read more