hi, i need some help related to wordpress shordcode. I want to make a custom button shortcode here's the php code function button( $atts, $content = null ) { extract(shortcode_atts(array( 'size' => 'large', 'url' => '#', ), $atts)); $out = "<a class=\"$size button \" href=\"$url\">" .do_shortcode($content). "<a/>" ; return $out; } add_shortcode('button', 'button'); PHP: when i call the short code like [button]let's go[/button] the result i expected is like : <a class="large button" href="#">let's go</a> HTML: but what i got is with double <a> in the end of code: <a class="large button" href="#">let's go</a><a></a> HTML: does anybody can help me? what's wrong? Thanks in advance.
ouch...., stupid me!!! just forget it it's just a misplaced character, i should put </a> not <a/> . Thanks.