0

I'm working on wordpress and I want to order my post by rating. I'm new with it, and I need some help. I tried many things, but seem it's not working :/

My Wordpress Custom field which contain the numerical value (rating) is : geekmag_cmb2_general_review

I have heard about WP Query but don't understand how it works/use it and where should I write the WP_Query :(

Sorry if it seam easy to you, but I really want to understand how to do and how it works, that is why i post here.

Here image about how i can filter right now enter image description here

enter image description here

enter image description here

Thank you !

  • Order results by meta value – nmr May 17 '19 at 14:18
  • Hi, Thanks for answer. If i select Meta Value, I have to specify something in Additional ? – Lucas May 17 '19 at 14:20
  • Where do you want to sort your posts (blog page, list in sidebar, some specific page with a list of posts)? Is posts come from the main loop, or perhaps you are using the get_posts() function, or create a new WP_Query object? – nmr May 17 '19 at 14:48
  • In a Widget from my template. This widget select post and allow me to filter em by date, meta value, meta num value.. But i can't order by rating :( – Lucas May 20 '19 at 6:32
  • 1
    Hi, Thanks for fast answer ! Link goes to Wordpress Dock, but i finally did what i wanted ! Juste order by meta num value and in "Additionnal args" i add "meta_key=geekmag_cmb2_general_review" and it's working ! :) I was looking for somthing harder but sometimes, simplest is better – Lucas May 20 '19 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.