Home › Forums › General Issues › Flexible content Inception › Reply To: Flexible content Inception
Ok, I’ve workaround my issue by creating a second shortcode :/
function taz_embeddedFeatures_shortcode($atts, $content = null){
$a = shortcode_atts(array(
'id' => null
), $atts);
return '[taz_features id="' . $a['id'] . '"]';
}
add_shortcode('taz_embeddedFeatures', 'taz_embeddedFeatures_shortcode');
I’ve also reverted back to my original taz_get_field_data function:
function taz_get_field_data($shortcodeID){
if (class_exists('acf')){
$layouts = get_field('taz_features', false, true);
return $layouts[$shortcodeID - 1];
} else {
error_log("taz_get_field_data(): ACF Plugin is not available.");
return null;
}
}
So now, When I need for instance to insert a taz_features (like a gallery) into another one (like a carousel), I’m writing [taz_embeddedFeatures id=4] into my carousel slide.
Thank you “Me” ^^
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.