Support » Fixing WordPress » Sorting posts, per category, by priority

  • Resolved Daffydd57


    Hi all,

    Would like to use the WordPress admin as a news updater – pushing the stories to my website. I would like to be able- throught custom field? – to give a post a priority number so that the posts will fall onto the homepage in the order we want them to.

    Can this be done? I would appreciate any info on this. I know nothing about coding php or MySQL so details would be great! 🙂

    Thanks so much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Daffydd57


    Okay – I’m making some headway here.

    I’m thinking that I can use the custom fields – set to “Priority” and set the value (1 through 9) per post.

    Then – and this is where I get a bit lost – I can use the


    or use the meta_compare – I’m not sure…

    I could then, if I am not mistaken, push all the posts with the “1” value to the homepage. That is part of the solution.

    What I want to do, and don’t know how to modify the query_posts statement – is display the posts ranked by meta_key value. So that all the “1” posts are first, then followed by “2”, etc…

    So little help with that code would be greatly appreciated! 🙂





    Thread Starter Daffydd57


    xdesi – it does appear to be doing what I want!!! Thanks so much!

    Nice one 🙂

    Thread Starter Daffydd57


    Okay – let’s try to take this a step further if possible. The above system is working perfectly – but I would like for each new post to have a default meta_key – meta_value of 5 for the priority custom field.

    So that when bringing up the new post dialog the custom field is already set to “priority” and the value is set to “5”

    Asking too much? 🙂


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting posts, per category, by priority’ is closed to new replies.