i created some shortcodes which i have include into functions.php
This is the shortcode.php code i have used:
// alert box
function alertBox($atts, $content = null) {
extract(shortcode_atts(array(
"bgcolor" => '#ffffff'
), $atts));
return '<div class="alertBox" style="background:'.$bgcolor.'">'.$content.'</div>';
}
add_shortcode("alertbox", "alertBox");
/*** info box ***/
function infoBox($atts, $content = null) {
extract(shortcode_atts(array(
"bgcolor" => '#ffffff'
), $atts));
return '<div class="infoBox" style="background:'.$bgcolor.'">'.$content.'</div>';
}
add_shortcode("infobox", "infoBox");
All this was included into the functions.php using this line:
include TEMPLATEPATH . '/extras/shortcodes.php';
When working on wamp (offline) shortcodes work beautifly but online wordpress only spew out the actuall tags like this
[alertbox]Sometext[/alertbox]
I have created many shortcodes tough mostly with copy/paste/refine.. Anyone got an idea as to why this might happen ?
WP_DEBUGdisplay any relevant errors? – Adam Backstrom Aug 18 '11 at 3:21