- Ian Daly(Private) January 12, 2021 at 7:25 pm #272594
For some reason the random sort option doesn’t work everywhere on my live site. But it works perfectly fine on my local host. I am using wpengine for the host. Have you guys run into anything like this before? Any ideas what could be causing this?
The only differences between my environments that I can see:
Localhost: Server Info: nginx/1.16.0
PHP Version: 7.3.5
Wpengine: Server Info: Apache
PHP Version: 7.4.13
One more oddity on the live site –
These filters work, and do sort randomly by default: https://visithoodriver.com/stay/?_sft_type=bed-breakfasts
These do not: https://visithoodriver.com/dine/ (none of the explore feeds do)
But they are all setup the same way essentially.
And just to clarify again, on my localhost ALL of the random sorting works.
Thanks guys! Let me know what else you need me to send over. I am on the latest version of the plugin and WP 5.5.3Trevor Moderator(Private) January 13, 2021 at 10:25 am #272636
I wonder if this is the issue:
Also, regarding random ordering. The ‘random’ order that WordPress provides (which is what we use) is PER PAGE of results, thus some posts may (and likely will) be repeated on the next pages. Each load of posts by infinite scroll or pagination is a ‘page’.
This is how WordPress does it, sorry. Random is something I would generally advise against using, unless you are showing all posts in a single page.Ian Daly(Private) January 13, 2021 at 10:26 pm #272723
Thanks for the reply.
I found this, which is kind of old, but wondering if it could be reworked to work with your plugin:
I tried to mess with it a bit but couldn’t get it working.
Any other ideas on how to “randomize” the post order? It doesn’t need to be truly random but would be nice if I could get it to change at least every few hours. Was trying to come up with a creative solution but I’m not smart enough.Trevor Moderator(Private) January 14, 2021 at 12:30 pm #272765
Check this thread out (it turns to the question of random and pagination also, with some code snippets you might want to take a look at):Ian Daly(Private) January 20, 2021 at 5:53 pm #273383
Thanks for linking that and the quick reply. I am going to have to dig through it more thoroughly here soon but it sounds promising.
Is the last comment by Ross in that thread talking about a problem with the proposed solution though? Again thanks much. This plugin helped a ton on a site I made that has a lot of filters/feeds.Trevor Moderator(Private) January 20, 2021 at 6:07 pm #273385
It is a problem that you should be aware of and will need to work around.
Much as we can try to help, this issue is far outside the scope of our support, I am sorry. I think the fact that it isn’t done often suggests that many have tried and failed. Otherwise, there would be a solution either in core WordPress, or in a plugin, and there is neither.
You must be logged in to reply to this topic.
Our support hours are:10am - 5pm (GMT), Monday - Friday
Please be aware that tickets opened over the weekend will looked at on Monday.