<?php
/**
 * Basic loop for relationship
 *
 * @package Smart_Post_Show_Pro
 * @subpackage Smart_Post_Show_Pro/public/helper
 *
 * @since 2.0.0
 */

$acf_posts = $value;
?>

<ul>
	<?php foreach ( $acf_posts as $acf_post ) : // variable must be called $post (IMPORTANT). ?>
		<li>
			<a href="<?php echo esc_url( get_permalink( $acf_post ) ); ?>"><?php echo esc_html( get_the_title( $acf_post ) ); ?></a>
		</li>
	<?php endforeach; ?>
</ul>
<?php
wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly.
?>
