View Full Version : Using /'s in PHP code

05-18-2011, 11:51 PM
Hi all,

Wondering if anyone can help me...

I'm trying to hardwire some shortcode functionality which is built in to the theme of my wordpress site...

The shortcode allows for content to be toggled open and closed.

Here's the code I have used:

<?php echo do_shortcode(''); ?>

Text that i want to toggle, blah blah

<?php echo do_shortcode(''); ?>

On the pages however it doesn't seem to recognize the [/toggle] part, as it just adds " [/toggle] " on to the end of the text i want to toggle, blah blah :-/

I have a sneaky suspicion that it's something to do with the ending [/toggle] part??

Could anyone advise at to how I could fix this???


05-19-2011, 02:21 AM
Assuming the shortcode code was "created" properly, you would not require a closing tag which seems to be the case in your situation.