Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author scribu

    (@scribu)

    Please share the code you’re currently using – including the p2p_register_connection_type() call (paste it on pastebin.com, not directly here).

    Thread Starter Alicia St Rose

    (@laughhearty)

    Hi Scribu,
    Here’s my code on pastebin:

    https://pastebin.com/vfJ6C2vc

    Thanks!

    Thread Starter Alicia St Rose

    (@laughhearty)

    Hmm…Just noticed something else.
    I created new writer posts and all the titles show up next to each archive item. Is there a way have only one title show up? The one specific to the post type and not give me the whole list?

    Thanks!

    Plugin Author scribu

    (@scribu)

    Have you tried just using the_post_thumbnail() inside the <?php while ( $connected->have_posts() ) : $connected->the_post(); ?> loop?

    Thread Starter Alicia St Rose

    (@laughhearty)

    Hi Scribu,
    That seems like it’s going to work.

    https://pastebin.com/G2JngLgd

    But I need to limit the connections to just one author, the one that is connected to the works. Right now I get all the thumbnails and all of the authors, even if they aren’t necessarily connected to the work.
    For instance, I have Shakespeare and JK Rowling. Each Harry Potter book is displaying the thumb and title for JK Rowling AND Shakespeare.

    Is there a way around this?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Posts 2 Posts] Need to link thumbnail of one post type to the connected post type’ is closed to new replies.