$paged value being set to 0
-
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
https://localhost/blog/sites/14/
but this doesn’t
https://localhost/blog/sites/14/page/2
Oddly this will work
https://localhost/blog/page/2/?pagename=sites&site_id=14
as will
https://localhost/blog/index.php?pagename=sites&site_id=14&page=2
Any pointers to what might be causing the issue?
TIA
- The topic ‘$paged value being set to 0’ is closed to new replies.