WordPress – custom sort order

can you help me, how can i sort posts by some custom field, in wordpress 3?

do i need to create some custom fields, and add new field in db, or…?

Read More

tnx in adv!

Related posts

Leave a Reply

2 comments

  1. You can use query_posts to sort posts by custom fields (also referred to as meta key value pairs). Assuming you just want to add the sorting to the current view’s query, you can do something like this:

    global $query_string;
    query_posts($query_string . '&meta_key=foo&orderby=meta_value');