WordPress.org

Ready to get started?Download WordPress

Forums

post order by custom field in wp_post (3 posts)

  1. adnnan
    Member
    Posted 7 years ago #

    I'd added a new field in wp_posts table let say 'abc' now I want list the post according to 'abc' can anybody help me with that.

    Another thing I want to do this by plugin, i'd tried query_posts($query_string .'&orderby=abc&order=asc&posts_per_page=-1');
    which doesnt seem to work for custom fields. I think what I want to do can be done through get_post() but I'm clueless how.

    All help will be highly appreciated.

    Thanks in advance,
    Adi

  2. adnnan
    Member
    Posted 7 years ago #

    can anybody help? its urgent...

  3. maxblast
    Member
    Posted 7 years ago #

    i have the same problem: came up with a workaround though:
    put the "abc" in the title, sort by title

    ...and put the real title in a custom field that you call with this plugin:
    http://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/

Topic Closed

This topic has been closed to new replies.

About this Topic