Posts 2 Posts
Incorporate post to post inside normal query? (2 posts)

  1. watermelonkid
    Posted 3 years ago #

    I've read the basic usage and anything I can find on how to do this, but I cannot get this to output my connections. Can anyone point out what I'm doing wrong?

    1) In my functions, I've done this:

    p2p_register_connection_type( array(
    		'id' => 'work-samples_to_clients',
    		'from' => 'work-samples',
    		'to' => 'clients'

    2) I already have a working query to pull in my work samples from the work-sample custom post type. I just want to list the clients custom type that is connected to the work-sample. This query does everything right but list the p2p connections.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Can I not try to retrieve the p2p connection in the foreach? I'm getting nothing returned, so I'm obviously doing something (or a lot!) wrong. Any help, greatly appreciated.

    BTW, this is on a custom template page...not a single/page/etc. page.


  2. scribu
    Plugin Author

    Posted 3 years ago #

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