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 including the jobs list page which is and listings which live at Settings the category base to job-seekers causes every page under 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?

toomanyairmiles 4 months 0 Answers 15 views 0

Leave an answer