Plugin Author
Stiofan
(@stiofansisland)
Hi @dalton1958,
- The sorting by package ID or a similar id field can be done but not always via UI, if you make them in order FREE, Standard, Premuium then it can be done just via the UI, if for some reason the id’s are not in order then it can still be done but it needs a little code snippet to do that.
- Random is a strange thing in databases. In short, if you want random results on every page load then no caching will work, DB queries will need to run on each load which will again make the page load slower and paging will not work.
Long explanation: If you are talking about using the random sort AND the package IDs, then this will not work in the same query. A random order SQL can’t be directly mixed with any other sorting options. There are ways to work around it a little but they usually have some trade offs in terms of query times. For now i’ll assume you don’t want to mix them and just want pure random. We do have a random sore UI option which is easy to implement, this will randomise the results and it will change every 24 hours. Why every 24h? This way, you get paging to work, you go to page 2 and you atre guarenteed to have different results, if you have it be different on every load then page 2 could containt the same results. It is also cache friendly, if you are using any type of cahing then it will work with this setup, but if you want it to be random on each reload then no caching will work and the page loads will always be slower. You can ofcourse have it refresh the results quicker than 24h, we have a filter for that..
You do have other options if you want to place certain packages near the top, you could add a new section or use our Ads addon to place certain listings at the top in a new section, if you need more info on any paid products please contact us directly (we are not allowed to discuss them here, WP rules).
Thanks,
Stiofan
