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 wanna display today's most viewed post list ? order by custom meta = views

Is it possible ?

share|improve this question
WordPress does not natively capture any stats. Are you using any plugins or services to capture such information? – Rarst Oct 12 '11 at 22:22
im using my functions it updates the views cutom meta smilar to postwievs – Fatih Toprak Oct 17 '11 at 22:47

If you have value stored in simple enough format you can use meta_key and meta_value_num query arguments to sort by it. See Order & Orderby Parameters in Codex.

share|improve this answer
i did but didint work. the query code here; $today->query('post_type=portfolyo&showposts=15&meta_key=views&orderby=meta_valu‌​e&order=desc'); – Fatih Toprak Oct 22 '11 at 15:01

try this:


changes is "orderby=meta_value_num"

share|improve this answer
great that worked thanks. – Fatih Toprak May 12 '12 at 15:20
@FatihToprak Why not accept the answer then? – Brian Fegter Aug 30 '12 at 3:37
What you mean Fegter ? – Fatih Toprak Sep 12 '12 at 5:28

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.