WordPress.org

Ready to get started?Download WordPress

Forums

Orderby parameters of query_post too limited after 2.6 (2 posts)

  1. davidgarlitz
    Member
    Posted 5 years ago #

    Hi folks,

    Could we add to the list of parameters accepted by "orderby" in query_posts or get_posts? Shouldn't we be able to easily order posts by any of the db tables of wp_posts?

    I've just hacked my wp core to add "post_name" as one of the parameters (which, before wp 2.6, I was able to simply call in the get_posts query!). A simple solution, but seems ridiculous to have to hack a core function to do it.

    Dave

  2. mrmist
    Forum Janitor
    Posted 5 years ago #

    I'd have thought that you can still add a filter on 'posts_orderby'- here's an example, here's another.

Topic Closed

This topic has been closed to new replies.

About this Topic