WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 want to make an url with meta_key=post_views_count.

E.g: http://www.mysampleweb.com/?meta_key=post_views_count&orderby=meta_value&order=DESC

So the posts should be ordered by Views.

Views are counting in the backend - but the url doesn't work. Just orders after newest/oldest posts.

How can I setup this query? Like it is above, it's not working.

Do I have to put something into functions.php - a rewerite Rule?

Thank you!


share|improve this question

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.