PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Orderby=rand and pagination

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Is there any way to get the woof orderby=rand to work properly with pagination? Currently, it randomizes every page every time and can result in the same item on multiple pages.

 

I have found some old posts on using a seed technique but none of those codes seem to work correctly with woof, nor do any plugins that try to implement a random sort.

Hello

This is a filter plugin and does not affect sorting

I ask because as per the codex for woof_products:

  • orderby – price-desc, price, popularity, rating, title, rand, date

Hello

Yes, it is possible to set default sorting in the shortcode.  this value is passed to wp_Query( https://share.pluginus.net/image/i20210924143459.png ) - https://developer.wordpress.org/reference/classes/wp_query/

it works like the wordpress developers did and unfortunately on my part I cannot change this

Ah, I see.

I think the other plugins break because of how woof calls wp_Query, not a problem per see... I think If I inserted the seed code within your code where it is called it might fire correctly.  If I get it to work I'll let you know.

Hello

Ok!  Great!