Bug short codes add double quotes at the end
-
Hi all please help! This is driving me nuts!
I have a shortcode that I’m trying to add to my theme:
this is the shortcode:
function one_half( $atts, $content = null ) { return "<div class='eight columns'>" . $content . "</div>"; } add_shortcode('one_half', 'one_half');
This is what it outputs:
<div class="eight columns">Half columns</div> <div class="eight columns">Half Second columns</div>
Not sure if you can see it here but when I look up my source, I see this exactly:
<div class="eight columns">Half columns</div>" "<div class="eight columns">Half Second columns</div>
and the
""
make it break. Is there anything I’m missing? Please help!Thanks!
P.S. I have already tried to put the following php code to remove the p tag which helped but didn’t remove the
""
:remove_filter ('the_content', 'wpautop');
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Bug short codes add double quotes at the end’ is closed to new replies.