501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says
1744 posts Building the Web.
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Beta Tester
+10 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

2268 posts
  • Elite Author
  • Author Level 10
  • Exclusive Author
  • Winner
+16 more
mpc
says

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

1744 posts Building the Web.
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Beta Tester
+10 more
ZoomIt
says

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

149 posts
  • 4 Years of Membership
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
+1 more
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 :)

1001 posts
  • Elite Author
  • Author Level 9
  • Top Monthly Author
  • Trendsetter
+9 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

356 posts
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
  • Collector Level 3
+4 more
cosmincotor
says

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

737 posts
  • Affiliate Level 7
  • Author Level 8
  • Collector Level 3
  • Top Monthly Author
+9 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.

1001 posts
  • Elite Author
  • Author Level 9
  • Top Monthly Author
  • Trendsetter
+9 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.

356 posts
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
  • Collector Level 3
+4 more
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