Shortcodes don't work online
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 beautifully but online WordPress only spew out the actual tags like this:
[alertbox]Sometext[/alertbox]
I have created many shortcodes, though mostly with copy/paste/refine... Does anyone have an idea as to why this might happen?