Route subpage to Custom Post Type
I usually struggle with this, however this time I managed it relatively easy. Main reference for this answer is here: https://codex.wordpress.org/Rewrite_API/add_rewrite_rule I’d like to use anything in the below as discipline. /artists/djave_co/anything First of all, I added a “rewrite tag” function custom_rewrite_tag() { add_rewrite_tag(‘%discipline%’, ‘([^&]+)’); } add_action(‘init’, ‘custom_rewrite_tag’, 10, 0); Next, I did print_r($wp_query->query_vars) on … Read more