The url now it’s https://odgarchitects.flywheelsites.com/cat/test/
cat – is a category
test – post
I was able to make it work using the code below and adding %project_category% on the rewrite field on the CPT, just wondering if could get to that just using the plugin
function write_projects_permalinks( $post_link, $post ){
if ( is_object( $post ) && $post->post_type == 'projects' ){
$terms = wp_get_object_terms( $post->ID, 'project_category' );
if( $terms ){
return str_replace( '%project_category%' , $terms[0]->slug , $post_link );
}
}
return $post_link;
}
add_filter( 'post_type_link', 'write_projects_permalinks', 1, 2 );