Forums

[resolved] Sorting posts by custom field (1 post)

  1. nadine00
    Member
    Posted 2 years ago #

    Hi,

    How can I go about sorting posts in a specific category by a custom field? I've been reading up on these:
    http://codex.wordpress.org/Template_Tags/query_posts
    http://codex.wordpress.org/Function_Reference/WP_Query

    And I gave this method a shot...but no go:
    http://esdev.net/sort-events-by-date-in-wordpress-using-custom-fields/

    I really just want something that works like this:
    get_posts('numberposts=10&orderby=meta_key=event_date&cat='.$cat);

    Also this page isn't the main loop, its a secondary page, and i'm pulling posts by get_cat_ID.

    Suggestions?

    Thanks!

    _n

Topic Closed

This topic has been closed to new replies.

About this Topic