I'm running some custom URL filters to allow myself to create some nice looking URLs.
Specifically:
'(sites)/(.+?)/(page)/?([0-9]{1,})/?$'] = 'index.php?pagename=$matches[1]&site_id=$matches[2]&paged=$matches[3]
['(sites)/(.+?)$'] = 'index.php?pagename=$matches[1]&site_id=$matches[2]
The URL works correctly but the paging is not. The $paged value in the $wp_query object is always 0.
So this URL shows the first page of results
http://localhost/blog/sites/14/
but this doesn't
http://localhost/blog/sites/14/page/2
Oddly this will work
http://localhost/blog/page/2/?pagename=sites&site_id=14
as will
http://localhost/blog/index.php?pagename=sites&site_id=14&page=2
Any pointers to what might be causing the issue?
TIA