Collapse-o-matic in a php template – use a variable?
-
Collapse-o-matic is working just fine in my php template-file when I hard-code the “hidden” text:
<?php echo do_shortcode(‘[expand title=”DESCRIPTION”]description[/expand]’); ?>
But what I’d really like to do is have the text in a variable:
<?php $x=the_content();
echo do_shortcode(‘[expand title=”DESCRIPTION”]$x[/expand]’); ?>Why doesn’t that work?! What should I be doing?
Thanks!
https://www.ads-software.com/plugins/jquery-collapse-o-matic/
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Collapse-o-matic in a php template – use a variable?’ is closed to new replies.