4189 posts Community Mod Building awesome stuff for your mobile devices!
    Has referred 100+ members Has sold $125,000+ on Envato Market Has been a beta tester for an Envato feature Has collected 1+ items on Envato Market
+14 more
Enabled Envato team says

Hi everyone, I’ve been searching, for a while now, for a proper way of adding shortcodes to themes without affecting third-party shorcodes (eg. from plugins).

The problem is caused by WordPress and its “wpautop” which adds unwanted paragraphs and br tags.

How did you get rid of those paragraphs and br tags without turning wpautop off?

If anyone could provide a solution (preferably staff or authors who have themes with shortcodes that have been approved), that will be approved on Themeforest, I’d greatly appreciate it!

Thank you!

1470 posts
    Has referred 1+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Made it to the Authors' Hall of Fame
+3 more
OriginalEXE says
4189 posts Community Mod Building awesome stuff for your mobile devices!
    Has referred 100+ members Has sold $125,000+ on Envato Market Has been a beta tester for an Envato feature Has collected 1+ items on Envato Market
+14 more
Enabled Envato team says

https://gist.github.com/bitfade/4555047

Thanks mate, but have you used this in themes and had them approved? Or is there anyone who used this and has had themes approved?

1470 posts
    Has referred 1+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Made it to the Authors' Hall of Fame
+3 more
OriginalEXE says


https://gist.github.com/bitfade/4555047
Thanks mate, but have you used this in themes and had them approved? Or is there anyone who used this and has had themes approved?
This is what bitfade/pixelentity uses in all of their themes. He was rejected once for that but when he explained that it only affects his own shortcodes, item passed, so you are good to go 100%.
4189 posts Community Mod Building awesome stuff for your mobile devices!
    Has referred 100+ members Has sold $125,000+ on Envato Market Has been a beta tester for an Envato feature Has collected 1+ items on Envato Market
+14 more
Enabled Envato team says



https://gist.github.com/bitfade/4555047
Thanks mate, but have you used this in themes and had them approved? Or is there anyone who used this and has had themes approved?
This is what bitfade/pixelentity uses in all of their themes. He was rejected once for that but when he explained that it only affects his own shortcodes, item passed, so you are good to go 100%.

Many thanks!

1675 posts Multimedia Artistry
    Has referred 100+ members Has sold $75,000+ on Envato Market and is now an Elite Author Has collected 10+ items on Envato Market Contributed a free file of the month
+4 more
dnp_theme says

https://gist.github.com/bitfade/4555047

Thanks a million, I think this will fix my validation issues !!

498 posts Code is Poetry
    Has referred 50+ members Has sold $125,000+ on Envato Market Has collected 1+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+3 more
egemenerd says
1470 posts
    Has referred 1+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Made it to the Authors' Hall of Fame
+3 more
OriginalEXE says

Thank bit fade, he is the author :)

3014 posts
    Helps us moderate the forums Has been part of the Envato Community for over 5 years Helped several times protecting Envato Market against copyright violations Won a competition
+16 more
dtbaker Envato team says

A mate of mine just had his theme rejected for using this code. Should I get him to re-submit it and explain that it only affects his shortcodes (as mentioned above)?

Or is there a better solution out now?

Cheerio,
Dave

84 posts
    Has been part of the Envato Community for over 3 years Has referred 10+ members Has sold $40,000+ on Envato Market Has collected 1+ items on Envato Market
+1 more
Coffee-Themes says

A mate of mine just had his theme rejected for using this code. Should I get him to re-submit it and explain that it only affects his shortcodes (as mentioned above)?

Or is there a better solution out now?

Cheerio,
Dave

No, i had to remove entirely bitfade solution. Explaining that it affect only my shortcodes didn’t help.

by
by
by
by
by
by