Last active
April 24, 2022 11:47
-
-
Save wpflames/caec84ad78896229c7dbe9e5b7865086 to your computer and use it in GitHub Desktop.
ACF Post Object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if( have_rows('repeater') ): ?> | |
| <?php while ( have_rows('repeater') ) : the_row(); ?> | |
| <?php $post_object = get_sub_field('post_object'); ?> | |
| <?php if( $post_object ): ?> | |
| <?php $post = $post_object; setup_postdata( $post ); | |
| // Variables | |
| $title = get_the_title( $post_object->ID); | |
| $link = get_field('link', $post_object->ID); | |
| $image = get_field('image', $post_object->ID); ?> | |
| <h4><?= $title ?></h4> | |
| <?php wp_reset_postdata(); ?> | |
| <?php endif; ?> | |
| <?php endwhile; ?> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment