Hello
When I place two shortcodes one after the other, the second one brakes, there should be a single space between them for them to get printed properly.
[button]read more[/button][button]read more[/button] = Doesnt work
[button]read more[/button] [button]read more[/button] = Works
I found another topic about this one but there surely have to be a better solution.
http://wordpress.org/support/topic/multiple-shortcodes-bug?replies=3
Is it posible to do this without the space?
The code that im using:
function button_shortcode( $atts, $content = null ) {
extract( shortcode_atts( array(
'url' => 'button',
'color' => 'button',
), $atts ) );
return '<span class="button_' . esc_attr($color) . '"><a href="' . esc_attr($url) . '">' . $content . '</a></span>';
}
add_shortcode('button', 'button_shortcode');