Support » Plugin: Anything Order » Orderby hi-jacked to be menu_order

  • I noticed a conflict with this plugin when I do a post query with a custom orderby, yet this plugin puts menu_order as first priority.

    Should it not be the case that the only time you should set the orderby to menu_order is if it hasn’t been previously set? Otherwise custom orderby queries will not work appropriately.

    I’ve made a minor change to the post/class.php which does just that. Starting with line 40, notice these difference:

    if ( is_admin() && ! isset( $_GET['orderby'] ) ) {
                if ( false === strpos( $orderby, 'menu_order' ) ) {
                    $orderby = "$wpdb->posts.menu_order ASC,$orderby";

    Doing so fixed my issue. Does this seem like the more logical approach?

    I love this plugin and want to continue to use it, but this can make things difficult.

  • The topic ‘Orderby hi-jacked to be menu_order’ is closed to new replies.