Custom Fields
Support MB Relationships Order of Relationship

  • Creator
  • #14484
    Resolved Matthias Nettekoven

    When ordering the relationship, the order_from / order_to only reflects the order on the Admin Side but not on the Front.

    $args = array(
                'post_type' => 'staff-member',
                'post_status' => 'publish',
                'relationship' => array(
                    'id' => $relation,
                    'to' => get_the_ID()

    How can I access the order I used on the admin side?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #14490
    Matthias Nettekoven

    Anyone? The args above are referring to a default WP Query.

    Matthias Nettekoven

    Nevermind, the code part I used was using get posts which does not seem to work for the order. I switched over to WP Query. Any reason why the order does not work for get posts? The relationship query works as intended but not the order.

    Anh Tran

    Hi Matthias,

    Using get_posts is risky, since it auto applies suppress_filters=true, which is used to filter the results (the extension changes the query by applying new WHERE, JOIN clauses). If you want to make it work like WP_Query, I think you need to set it to false.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.