Relationship order in Oxygen repeater

Support MB Relationships Relationship order in Oxygen repeaterResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44514
    AndrewAndrew
    Participant

    I have a CPT called projects and one called team_members. When displaying projects I'm including in the template a repeater to display team_members that are related to the current project. This works except I need the repeater to respect the order the team_members are set in the project. You can drag and drop the order of the team_members in the relationship (called team_to_project) to control their order but this is not reflected in the repeater on the front end. What parameter do I need to set as the orderby in my Oxygen custom query to have this work? Many thanks for any help.

    #44518
    AndrewAndrew
    Participant

    Looks like they are ordering based on what team-members are set in the cpt rather than the order they are set in the relationship.

    #44527
    PeterPeter
    Moderator

    Hello Andrew,

    There isn't a parameter to set the order when using the relationship. By default, it should display the order of relation in the admin area. You can try to use the code in the documentation to output the relationship and recheck this issue. Please use the default WordPress theme and don't use Oxygen when testing,
    https://docs.metabox.io/extensions/mb-relationships/#getting-connected-items

    #44529
    AndrewAndrew
    Participant

    Hi Peter, yes I managed to use the api in a code block and that worked as desired. Was hoping to be able to use the Oxygen repeater to do this but this seems like a limitation of either Oxygen or me.

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