4349 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 Moderator 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!

1485 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
4349 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 Moderator 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?

1485 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%.
4349 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 Moderator 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!

1708 posts Multimedia Artistry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Contributed a free file of the month
  • Won a Most Wanted contest
+4 more
dnp_theme says

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

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

506 posts Code is Poetry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has referred 50+ members
  • Has collected 1+ items on Envato Market
+3 more
egemenerd says
1485 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 :)

3131 posts
  • Located in Australia
  • 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
+16 more
dtbaker Moderator 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