Pagination problem
I have two custom rewrite rules: add_rewrite_rule(‘foo/bar/?’, ‘index.php?post_type=foo’, ‘top’); add_rewrite_rule(‘foo/bar/([a-z]+)/?’, ‘index.php?post_type=foo&bar=$matches[1]’, ‘top’); Which gives me posts that match a custom variable bar. However, I want to handle pagination too, thus when a number succeeds /bar/ wordpress should treat it as a page number. I wrote: add_rewrite_rule(‘foo/bar/([0-9]+)/?’, ‘index.php?post_type=foo&paged=$matches[1]’, ‘top’); In my custom function which is attached … Read more