WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wondering what is the best way to sort posts on homepage using a small algorithm like custom_field_votes / ( post_hours_old + 2 ) ^ 1.8

I have tried creating a new custom field with the result but updating all posts at once or even hourly with a cron doesn't sound very good (performance).

Any opinions?

share|improve this question
What have you already tried? Please show us your research. – kaiser Sep 2 '13 at 11:37
Please don't link to external sources. Just edit your question and add the code there. – kaiser Sep 2 '13 at 14:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.