- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 200 and 499 users
- Sold between 50 000 and 100 000 dollars
I’v started learning about wordpress shortcodes but After I create some shortcodes and uses it in wordpress. It gives me an extra break tag that I never wanted to get. This causes layout issues.
Is there any solution?
Here is an example of a simple shortcode I use and how it look after I’m using it:
The shortcode:function OneThird($atts, $content = null ) {
return '<div class="one_third">' . do_shortcode($content) . '</div>';
}
add_shortcode("one_third", "OneThird");
This shortcodes become in html:
<div class="one_third"></div> <br />
I DON ’T WANT THE BREAK TAG !
This issue is actually stopping me from releasing a new wordpress theme.
The post editor adds < br / > – Do you have an empty line after the shortcode?
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 200 and 499 users
- Sold between 50 000 and 100 000 dollars
The post editor adds < br / > – Do you have an empty line after the shortcode?
No I didn’t had an empty line. But after having an empty line between shortcodes the BR disappeared! Thanks Man 
Great! Glad I could help 
That tip really helped ! Thanks.
