Wrapping do_shortcode around additional php code
-
Hi, I have some shortcode I’m trying to wrap around some additional php code. Basically I’ve downloaded a plugin that hides/reveals content which I wish to wrap around my comments box.
The two codes I have is –
<?php echo do_shortcode(‘[show-hide]’.$text_to_be_wrapped_in_shortcode.'[/show-hide]’); ?>
I want to replace the ‘$text_to_be_wrapped_in_shortcode’ with the below:
<?php if ( comments_open() || ‘0’ != get_comments_number() )
comments_template(); ?>Any ideas and help appreciated.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Wrapping do_shortcode around additional php code’ is closed to new replies.