The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Posts 2 Posts
[resolved] Get connected "from" instead of "to"? (2 posts)

  1. jtwg
    Posted 3 years ago #

    I have a post type called customer, and another called case-study. Each customer can have multiple case studies connected to it. The connection type is case-study_to_customer. I'm trying to get a list of customers, with their connected case studies.

    I'm using WP_Query to get the customers, and then I am using WP_Query to get the case studies, passing the following parameters in the array:


    This second query fails with an error: "Could not find direction(s)."

    Does p2p support retrieving related records like this? If not, what is a better way of doing it?


  2. scribu
    Plugin Author

    Posted 3 years ago #

    Just add 'connected_direction' => 'from'.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.