WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Random order of products on each page load?
- AuthorPosts
- 3 May, 2020 at 7:35 pm #48484
Hi Olly,
Forgive me if the answer is somewhere in the forum, I tried searching but couldnt find an answer.
I have a problem with the products being displayed in a random order every time the page loads.
You can try it out here:https://housebythesea.dk/metal/
Is there a setting in the pizza plugin that is causing it, or how do I remove this behaviour?
I haven’t experience it the previous 2.xxx plugin.
Thanks in advance 🙂
4 May, 2020 at 1:17 am #48491bit of a guess admittedly without seeing everything, but generally/by default menu items (ie “products”) are sorted by order set
([your domain]/wp-admin/edit.php?post_type=wppizza&page=layout -> Items Sorting and Category Display ->Menu items sort order)see also here
https://docs.wp-pizza.com/faqs/?section=sorting-menu-itemsif you still have issues after trying this, let me know and we’ll have to look in a bit more detail
4 May, 2020 at 10:14 am #48493Hi Olly
Thanks for the quick reply.
Here is a screenshot of my sorting order setting.
I tried playing with the sorting order. Basically if I change it to sort by Title, ID, Date – the items are consistent and always comes in the same order.
If I change it to my prefered choice, the default “As set by Order” attribute”, then items start coming out randomly.
I then checked which order no each product had, and all of them have 0 as default.
As soon as I change one of them to say -1, then that one will always show as the first one.So as far as I could test out, is that there is a sort problem when all the product items have order “0”.
How does the sort order work if all of them are 0 – does it then sort by title to determine the order?
4 May, 2020 at 12:55 pm #48501>How does the sort order work if all of them are 0 – does it then sort by title to determine the order?
that’s a question for wordpress actually the default (ID) simply orders by “menu_order” column in the wp_posts table.
(WPPIZZA is just a custom post type so on that front behaves just like other posts) i suspect that wordpress itself soe some sorting if 2 order id’s are equal by published date or something
all thing being equal, the frontend is essentially the same order as the order the items are displayed in the backend (wppizza>menu items)ignoring all of that, i somewhat suspect you have some other plugin running somewhere that changes the sort order
have you tried turning off other plugins ?10 May, 2020 at 4:59 pm #48676Hi Olly
Thanks for your suggestions of turning off all of my plugins to see if that changes the sort order.
I tried it, but it does not change anything.
Items are still coming in randomly everytime I reload the page.
Any other ideas to try and solve the problem?
10 May, 2020 at 9:06 pm #48683did you – temporarily at least – switch to some default theme too ?
>Any other ideas to try and solve the problem?
the obvious one is of course to simply set the order ids in the order you want things - AuthorPosts
- The topic ‘Random order of products on each page load?’ is closed to new replies.