marvinski03
marvinski03

Reputation: 47

Weekly new random sorting for WordPress posts

Currently I'm looking for an idea to create a weekly new random sorting for wordpress posts of a custom type. I need it for a page with paid ads. Nobody should have a permanent position advantage. It would be great if the new random sorting were done automatically every week. It can also be triggered manually using a button in the backend.

Is there a plugin for this? I also have my own programming skills, but currently I am missing an approach for this project. Does somebody has any idea? Can the sorting in the custom loop depend on the calendar week?

Beste regards, Marvin

Upvotes: 0

Views: 77

Answers (1)

janh
janh

Reputation: 2972

You could just add a meta field "priority" and order by that. Once a week, you just set that field with a script, making any random order.

Since it only changes weekly, that's probably a lot easier than building a complex sorting logic that relies on the week number.

Upvotes: 1

Related Questions