Forums › Forums › Search & Filter Pro › Posts show in random order
- This topic has 5 replies, 2 voices, and was last updated 5 years, 1 month ago by
Ross.
-
Anonymous(Private) May 23, 2020 at 4:16 pm #245641
Hi,
I use s&f on a woocommerce store. I use as order setting: Menu order.
I have one product set in menu order 1 and the rest of the products have the same number.
When refreshing a category-age, all the products appear in a random order except the product with menu order ‘0’. Also when clicking to a next page in the result, it won’t show the products from that page, but also shows me products from page one again. Again in random order.How can I prevent this random sorting?
Example productpage: https://cadeau.compion.dev/product-categorie/kinderkussens/
Geert
Ross Moderator(Private) May 25, 2020 at 10:25 am #245707Hi Geert
It sounds like there may be something interferring with the query, causing a random order :/
Can you try disabling other plugins, and test on a default theme, to see if the same things happens?
Thanks
Anonymous(Private) May 28, 2020 at 8:25 am #246219HI,
Thanks for the reply.
I have:
+ Disabled all plugins except woocommerce and S&F
+ Tried the default storefront theme and basic wp theme
but nog results. The posts still shows me the random order through all products with the same menu=order.When I disable S&F, the random order stops and the products are in a fixen position every time the page refreshes. So it looks like S&F itself is causing the random order.
When I try another post-order setting in s&f, that order is working fine and not showing post in a random order.Could it be that the setting for post-order: menu-order, show post with the same menu-order in a random way?
Geert
Ross Moderator(Private) May 28, 2020 at 9:33 am #246228Hi Geert
So its only when choosing menu order you get a random order?
And the post with the position of
1
set, that is displayed consistently last / first?When we do a search, we don’t use many WP_Query paramaters, we do our own query, which gets a big list of Post IDs for your results, and we stuff that into a WP_Query using
post__in
Perhaps, when using menu_order, the post with position
1
is ordered correctly, but the rest are ordered according the IDs we supplied inpost__in
Does that sound like it might be correct?
If that is the case, I suspect, setting a secondary sort order (in the
posts
tab of your search form) might order the remaining posts how you want?Let me know how that works out.
Thanks
-
AuthorPosts