491 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says
1601 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 more
ZoomIt says
http://wpforce.com/prevent-wpautop-filter-shortcode/

“ThemeForest theme developers in particular seem to love adding this code to their themes.” – lol

2177 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred between 200 and 499 users
  • Has been a member for 5-6 years
  • Won a Competition
+10 more
mpc Volunteer moderator says

Thanks guys I have fixed it on my own ;P But for the next theme I will probably use the provided snippet.

1601 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 more
ZoomIt says

Would be nice to provide the fix since you started the thread and others may be intersted :d

149 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
IulianN says

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 :)

672 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Referred between 100 and 199 users
  • Has been a member for 3-4 years
+1 more
LCweb says

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 :D

293 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Europe
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
  • Envato Studio (Microlancer) Beta Tester
  • Has been a member for 3-4 years
cosmincotor says

I’m also looking for a bulletproof solution, so if anyone has it, please share it with us :)

731 posts
  • Elite Author
  • Attended a Community Meetup
  • Has been a member for 4-5 years
  • Sold between 100 000 and 250 000 dollars
  • Bought between 50 and 99 items
  • Exclusive Author
  • Most Wanted Bounty Winner
+2 more
mordauk says

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.

672 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Referred between 100 and 199 users
  • Has been a member for 3-4 years
+1 more
LCweb says

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.

293 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Europe
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
  • Envato Studio (Microlancer) Beta Tester
  • Has been a member for 3-4 years
cosmincotor says

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 ?

by
by
by
by
by
by