Order of Relationship

Support MB Relationships Order of RelationshipResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14484
    Matthias NettekovenMatthias Nettekoven
    Participant

    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?

    #14490
    Matthias NettekovenMatthias Nettekoven
    Participant

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

    #14493
    Matthias NettekovenMatthias Nettekoven
    Participant

    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.

    #14494
    Anh TranAnh Tran
    Keymaster

    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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.