4596 posts Community Mod Building awesome stuff for your mobile devices!
  • Contributed a blog post
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helps us moderate the forums
  • Has sold $125,000+ on Envato Market
+15 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!

1509 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
+2 more
OriginalEXE says
4596 posts Community Mod Building awesome stuff for your mobile devices!
  • Contributed a blog post
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helps us moderate the forums
  • Has sold $125,000+ on Envato Market
+15 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?

1509 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
+2 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%.
4596 posts Community Mod Building awesome stuff for your mobile devices!
  • Contributed a blog post
  • Elite Author: Sold more than $75,000 on Envato Market
  • Helps us moderate the forums
  • Has sold $125,000+ on Envato Market
+15 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!

1773 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 !!

527 posts Code is Poetry
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has referred 100+ members
  • Has collected 10+ items on Envato Market
+4 more
egemenerd says
1509 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
+2 more
OriginalEXE says

Thank bit fade, he is the author :)

3310 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 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 4 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by