<?php// Call to action posts chosen through a relationship ACF field within the call to actions Flexible Layout$cta_posts=get_sub_field('call_to_action');if($cta_posts):// Loop through the chosen Call to action postsforeach($cta_postsas$post):// Setup the post and display the Flexible Layouts that create that "Call to action component"setup_postdata($post);get_template_part('partials/cta-flexible-layouts/flexible','layouts-loop');endforeach;wp_reset_postdata();// IMPORTANTendif;
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.