...

View Full Version : Using /'s in PHP code



bxenon
05-18-2011, 10: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???

Cheers,
Ben

shadowmaniac
05-19-2011, 01: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.

Ref:
http://core.trac.wordpress.org/browser/tags/3.1.2/wp-includes/shortcodes.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum