AJAX filter/search results are pulled in via ajax.
The underlying WP_Query for the AJAX results is the same as the WP_Query used for loading the first page of results (without AJAX).
Some bugs have been ironed out and unnecessary code has been removed.
There are still a lot of potential improvements to be made, e.g.
remove get-news-rest-api.php and re-write functions that rely on it.
remove pagination.php and modify templates that use it, as a 2nd WP_Query should not be run just for pagination.
^ having removed the file get-blog-rest-api.php and refactoring pagination on page_news.php and page_blog.php shows that the above improvements are feasible.
This PR includes a refactor of archive pages.
AJAX filter/search results are pulled in via ajax.
The underlying WP_Query for the AJAX results is the same as the WP_Query used for loading the first page of results (without AJAX).
Some bugs have been ironed out and unnecessary code has been removed.
There are still a lot of potential improvements to be made, e.g.
get-news-rest-api.php
and re-write functions that rely on it.pagination.php
and modify templates that use it, as a 2nd WP_Query should not be run just for pagination.^ having removed the file
get-blog-rest-api.php
and refactoring pagination onpage_news.php
andpage_blog.php
shows that the above improvements are feasible.