- This topic has 2 replies, 2 voices, and was last updated 1 month, 1 week ago by .
Hi, I"m trying to make relationship between CPT Work and CPT Press,
I want to be able to change the connection on both cpt pages and display the results on both single pages.
If i uncheck "Reciprocal relationship" i see and can change the connection and it's updates on both posts, but when i display in single.php i can see the selection only on single Work.
on single press i don't see the results. the code i"m using is bellow.
If i check the Reciprocal relationship, then i see the results on both single pages BUT i don't get the option to change the connection on CPT press - the connection area field appear only on work page.
$connected = new WP_Query( [ 'relationship' => [ 'id' => 'art-work-2-press', 'from' => get_the_ID(), // You can pass object ID or full object ], 'nopaging' => true, ] ); while ( $connected->have_posts() ) : $connected->the_post(); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endwhile; wp_reset_postdata();
I"m missing something?
How can i make changes and display on both pages?
- You must be logged in to reply to this topic.