My setup is as follows:
- Taxonomy called 'region'
- Terms in this taxonomy like 'scotland'
- Various post types that use this single taxonomy
I have achieved functioning pretty permalinks of the following format using the rewrite rule below:
add_rewrite_rule( 'region/([^/]+)/([^/]+)/([^/]+)/?', 'index.php?taxonomy=region&term=$matches&post_type=$matches', 'top' );
This give me a functioning URL like:
which is exactly what I need (region/[scotland] = taxonomy, type/[event] = post type)
However, I've tried adding an additional add_rewrite_rule to deal with pagination in the following URL format (I really don't get on well with regex!) but I just can't get pagination to function correctly - I'm was aiming to achieve the following:
I think I'm nearly there as I have one rewrite rule functioning correctly - but after trying lots of different things I've just not been able to achieve the correct regex/rewrite rule combination to achieve the pagination. The not-so-pretty permalink for this query, which functions correctly is: