• Resolved w12gilbert

    (@w12gilbert)


    hey everyone,

    I am trying to sort one of my catagories descending by a meta_value_number I seem to be doing something wrong or not calling the quesy correctly.

    I am using the Genesis theme.

    I copied the index.php and made a template cotest-videos.php and that works ok and only shows the videos from the contest-videos catagory. but i can’t seem to affect/effect how they are sorted. I am trying to sort the posts in this catagory by a meta key “facebook_likes” order descending by the number of likes each video has. trying to show five per page with pagination at the bottom of page.

    here is the template code and the page to my site where i am trying this is https://billgilberthomes.com/category/contest-videos/

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thanks
    Bill

  • The topic ‘sorting post in single catagory by meta key?’ is closed to new replies.