How to replace custom post type slug with custom field value by maintaining a specific URL structure?

I’ve fixed this issue by adding the below code:

add_rewrite_rule('our-team/developers/?$','index.php?pagename=our-team/developers', 'top');
add_rewrite_rule('our-team/support-staff/?$','index.php?pagename=our-team/support-staff', 'top');

Leave a Comment