ministryofjustice / intranet

Intranet used by the Ministry of Justice and agencies
MIT License
7 stars 1 forks source link

CDPT-2079 AJAX search fix & refactor #738

Closed EarthlingDavey closed 3 weeks ago

EarthlingDavey commented 3 weeks ago

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.

^ 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.