[Plugin: Posts 2 Posts] Nested loop
-
Great plugin. I am having trouble though.
I have a page named shop. I am setting it up as an archive to display multiple albums for sale.
Here’s the relationship I have set-up:
p2p_register_connection_type( array(
‘name’ => ‘artist_to_albums’,
‘from’ => ‘ak-artist’,
‘to’ => ‘ak-merch’
) );There’s only one artist for each merch.
I have a wp_query pulling the pages ak-merch. I’d like to display the artist name (the_title) within the subloop. I have tried multiple ways, but nothing works. I’ve tried get_post, which gives me all the artist names (not the one connected to the merch). I’ve tried a p2p type, but that just gets me the first artist name because then I have to reset the postdata and it gives me “store” (the page) as the title for everything forward.
Any ideas anyone?
The topic ‘[Plugin: Posts 2 Posts] Nested loop’ is closed to new replies.