4145 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer 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!

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says
4145 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer 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?

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
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%.
4145 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer 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!

1673 posts Multimedia Artistry
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 10 and 49 items
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
dnp_theme says

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

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

491 posts Code is Poetry
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 2-3 years
  • Europe
  • Exclusive Author
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
egemenerd says
1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Thank bit fade, he is the author :)

2957 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer 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
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
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