Page name vs custom post type slug conflict
I’m replicating an existing site with a URL structure that can’t be altered without fear of damaging its traffic, and using a plugin which creates a custom post type.
The issue is several pages are nested under site.com/job-seekers/page-name
including the jobs list page which is site.com/job-seekers/current-vacancies
and listings which live at site.com/job-seekers/current-vacancies/category/job-title
. Settings the category base to job-seekers causes every page under site.com/job-seekers/page
to 404.
Even if I attempt to circumvent the slug conflict using
add_action('init', function () {
add_rewrite_rule('^job-seekers/page/([0-9]+)','index.php?pagename=job-seekers&paged=$matches[1]', 'top');
}, 1000);
It does not work. Is there a way to configure the category base and the page slugs to be the same?
Leave an answer
You must login or register to add a new answer .