Archive page renders results alphabetically - Wordpress Solution
[Solved] - Archive page renders results alphabetically - Wordpress Solution |
---|
Try following codes |
For some reason my archive page is rendering both taxonomy menu items and the taxonomy results alphabetically and I can't figure out why (or when it happened). See the page at http://seontario.org/resources/.
The menu on the left should be displaying a taxonomy menu, with proper hierarchy, while the post list on the right is showing the posts correctly within their taxonomies, but the hierarchy of the taxonomies has been lost (general, legal structures, procurement and social finance policy should all be under 'policy').
The archive-resource.php is here: [[LINK href="http://pastebin.com/gexc7u3x"]]http://pastebin.com/gexc7u3x[[/LINK]]
There's a function to change the order of another archive to alphabetical, but even after deleting it this page isn't corrected. That function is as follows:
CW Solution - 1Hi Christopher Is there a reason you don't sort the results in the WP_Query? I'm assuming that this is the query you want to sort: Also, you should put a wp_reset_query at the end of the all the loops. It looks like you don't need it, but it's always good practice to put it in for non-loop queries. JC |
Date: 2022-10-21 04:58:59 |
Category: Wordpress |