404 error when using pagination with custom taxonomy of a custom post type

I’m using a plugin called Custom Post Type Permalinks to my my URLs pretty -> sitename.com/CPT/taxonomy. When i apply paginate_links() to taxonomy.php, the function seems to works as it produces the pagination links (like this -> sitename.com/locations/north/page/2) but produces a 404 error. However, pagination on the custom post type itself works (like this -> sitename.com/locations/page/2). Is it that WP doesnt recognize CPT/taxonomy? Most of the other solutions online don’t seem to work, send help!

Here’s what my code looks like

function create_zz_taxonomies() {
$args = array(
‘hierarchical’ => true,
‘labels’ => $labels,
‘show_ui’ => true,
‘show_admin_column’ => true,
‘show_in_rest’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘/locations’),
);
register_taxonomy(‘location’, array(‘locations’), $args); }

Read more here:: 404 error when using pagination with custom taxonomy of a custom post type

Leave a Reply

Your email address will not be published. Required fields are marked *