Hi,
I’m using a custom post type “mobiles” and taxonomy “brands” with this code for rewrite the URLs
add_filter( 'init', 'the_rewrite_orocess' );
function the_rewrite_orocess( $vars ){
/* custom post type */
add_rewrite_rule('mobiles/([^/]+)-phones/?$',
'index.php?post_type=mobiles&orderBy=$matches[1]',
'top');
add_rewrite_rule('mobiles/([^/]+)-phones/page/([0-9]+)?$',
'index.php?post_type=mobiles&orderBy=$matches[1]&paged=$matches[2]',
'top');
/* Taxonomy */
add_rewrite_rule('^brand/([^/]*)/([^/]*)?',
'index.php?brands=$matches[1]&orderBy=$matches[2]',
'top' );
add_rewrite_rule('^brand/([^/]+)/page/([0-9]+)?$',
'index.php?brands=$matches[1]&paged=$matches[2]',
'top' );
add_rewrite_rule('^brand/([^/]*)/([^/]*)/page/([0-9]+)?$',
'index.php?brands=$matches[1]&orderBy=$matches[2]&paged=$matches[3]',
'top' );
flush_rewrite_rules();
}
but the pagination return the page 2 loop content but the active is the button number “1” !!
Although it works in the archive of custom post pages
Could you check?