- Sold between 100 000 and 250 000 dollars
- Won a Competition
- Author was Featured
- Item was Featured
- Referred between 500 and 999 users
- Author had a Free File of the Month
- Author had a File in an Envato Bundle
- Bought between 10 and 49 items
pogoking saidhttp://themeforest.net/forums/thread/empty-p-tags-when-using-shortcodes/48520?page=3#647866
@pixelenity So what do you suggest? What do you use?
- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
“ThemeForest theme developers in particular seem to love adding this code to their themes.” – lol
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Community Moderator
- Author was Featured
- Bought between 50 and 99 items
- Referred between 200 and 499 users
- Has been a member for 4-5 years
- Won a Competition
Thanks guys I have fixed it on my own ;P But for the next theme I will probably use the provided snippet.
- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
Would be nice to provide the fix since you started the thread and others may be intersted :d
ZoomIt said
Would be nice to provide the fix since you started the thread and others may be intersted :d
+1 for this and up we go 
- Sold between 100 000 and 250 000 dollars
- Author was Featured
- Item was Featured
- Most Wanted Bounty Winner
- Bought between 10 and 49 items
- Exclusive Author
- Referred between 50 and 99 users
- Has been a member for 2-3 years
I had a very strange issue with empty paragraphs and spaces in the the shortcode of my last plugin.
I tried a lot of solution posted by authors here in the past months, but the only thing that solved it was this piece of code:
$data = shortcode content ..
$data= str_replace(array("\r", "\n", "\t", "\v"), '', $data);
return $data;
I don’t know if is the best way, but it works 
I’m also looking for a bulletproof solution, so if anyone has it, please share it with us 
- Attended a Community Meetup
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Most Wanted Bounty Winner
- Referred between 500 and 999 users
Bulletproof solution: do not any of this. This kind of behavior should only ever be done in plugins.
These kind of snippets literally cause me and many other plugin developers dozens or hundreds of hours in support requests.
- Sold between 100 000 and 250 000 dollars
- Author was Featured
- Item was Featured
- Most Wanted Bounty Winner
- Bought between 10 and 49 items
- Exclusive Author
- Referred between 50 and 99 users
- Has been a member for 2-3 years
mordauk said
Bulletproof solution: do not any of this. This kind of behavior should only ever be done in plugins. These kind of snippets literally cause me and many other plugin developers dozens or hundreds of hours in support requests.
Indeed. Probably my issue was caused by one of them, since on the Twenty Eleven theme everything was fine.
mordauk said
Bulletproof solution: do not any of this. This kind of behavior should only ever be done in plugins. These kind of snippets literally cause me and many other plugin developers dozens or hundreds of hours in support requests.
It’s true, in most cases these snippets can cause major problems, however without removing those empty p tags the shortcodes won’t work properly, because WordPress adds them all over the place.
So, again, has anyone found a proper way to create shortcodes in a theme, without the use of a plugin, and without affecting other plugins ?
