Shortcode in template which includes html and php
-
Hello,
I would like to use the shortcode in a template. The shortcode should enclose html and php. This is what I tried:
<php echo do_shortcode('[expand title="Mehr Erfahren" swaptitle="Weniger" targclass="collapse-container" id="impressum" rel="star-highlander" findme="auto" trigclass="mehr-erfahren-trigger" tag="div"] <div class="mehr-erfahren-text-container"><div class="mehr-erfahren-text"><?php the_sub_field('bodytext', 'option'); ?></div></div>[/expand]'); ?>
But unfortunateley it is not working. I guess the problem is that I try to execute php in php..?
Thanks in advance!
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Shortcode in template which includes html and php’ is closed to new replies.