• Resolved qwik3r

    (@qwik3r)


    I have the latest .04 alpha build, trying to generate a reciprocal connection I suppose.

    I create a connection between 2 custom post types: p2p_register_connection_type(‘events’, ‘locations’, true);

    This allows me to connect locations to events. However I would like to output all events that are currently connected to that location on the location page, so I would assume it would be the reverse however I am unsure how to do this, can you please advise?

Viewing 1 replies (of 1 total)
  • Plugin Author scribu

    (@scribu)

    $posts = get_posts( array(
      'suppress_filters' => false,
      'connected_to' => $event_id,
      'post_type' => 'location'
    ) );
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Posts 2 Posts] Reciprocal connection’ is closed to new replies.