Support

Account

Home Forums Backend Issues (wp-admin) "Events" object – taxonomy or post? Reply To: "Events" object – taxonomy or post?

  • Err… I think I see something regarding the “Querying Relationship Fields” doc

    If you have to query using get_field() on one end but get_posts() on the other, I’m not sure that’s *real* bidirectionality.

    Per the doc…

    “Related Viewpoints”, set on an Article post:

    set 3 x ‘Viewpoint’ posts:

    loop through $related_viewpoints = get_field('related_viewpoints');

    “Related Articles”, set on a Viewpoint post:

    the Article on which I set the Viewpoint post is not seen on the Viewpoint edit:

    have to return it/them with get_posts():

    So, there doesn’t seem like real bidirectionality here. To truly link them, you’d have to manually add the equivalent linked posts on each side.

    Could this be because I used a different field name on each side? related_articles and related_viewpoints. I don’t think so.

    – It looks like the doc on Bidirectional Relationships would implement this.

    – And @hube2‘s plugin is a variant of that.