I have this setup:
Slideshow Post Type
-- Repeater Custom Field
---Relationship Sub Field called "Project Link"
Relationship Field is related to the Gallery Post Type.
I am attempting to simply pull the permalink from the Gallery Post Type, so when the client loads a new Slideshow, they can link it to it's corresponding Gallery.
When I run this:
<?php foreach(get_field('project_link') as $link):?> <a href="<?php echo get_permalink($link->ID); ?>"> <?php endforeach; ?>
I get "invalid foreach"
Can anybody point me in the right direction? I would think this is the most basic of it's uses, so I must be overlooking something.