I have a list of posts and Post One and Post Two has several post selected on the Relatioship Field.
This is my expected outcome:
Post One
Post 1.1
Post 1.2
Post Two
Post 2.1
Post Three
Post Four
I put the Post 1.1 and Post 1.2 as a relationship field under Post One. How can I query that Post 1.1 and Post 1.2 has been set from Post One using the Relationship field so that I can exclude it from the main list and not be duplicated?
What I can do right now is query Post One and then list Post 1.1 and Post 1.2 underneath it but but how will I know that Post 1.1 and Post 1.2 has been set from Post One?
With this code:
<?php
if( $rel ): ?>
” target=”_blank”>
<?php echo $thetitle; ?>
<?php else : ?>
” target=”_blank”>
<?php echo $thetitle; ?>
<?php endif; ?>
From that code, other list are duplicated. My list looks like this:
Post 1.1
Post 1.2
Post 2.1
Post One
Post 1.1
Post 1.2
Post Two
Post 2.1
Post Three
Post Four