[Resolved] Custom order on front end listing of custom taxonomies
This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
It is on the front end that I am listing out the taxonomies. I am listing them out on the archive page of the CPT that the taxonomies belong to. I created the CPT with toolset Types. I created the archive page by creating the archive-**.php file for the archive page of the CPT. I'm building out the page using php, not the block plugin.
With my existing code, I am able to list out all the taxonomies but they are listed in alphabetical order. I just need to switch the the order of the first two items in the list.
Here is a portion of the code I'm using to display the listing of the taxonomies on the CPT's archive.php file :
This will allow you to get the terms of each post being listed out in that CPT's archive. However the problem with this now is that it will return the term objects, so you will then need to build an array with just the term names and then use the php sorting function to sort it by alphabetical order.
If you're unsure of how to proceed on this, you can provide me with admin access and a link to the archive page so that I can assist you with this.
It should be noted that custom coding is out of the scope of our support forum, however I will see how best I can assist with this one.
I can't share the login info because the site is not accessible online yet. But I am able to list out the terms (alphabetically). I just need to switch the position of the first two on the list.