1056 posts It's in the pipeline!
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
+7 more
purethemes says

My item also was soft rejected for the same reason, try this:
function shortcode_empty_paragraph_fix($content){   
    $array = array (
        '<p>[' => '[', 
        ']</p>' => ']', 
        ']<br />' => ']'
    );

    $content = strtr($content, $array);
    return $content;
}

add_filter('the_content', 'shortcode_empty_paragraph_fix');

Don’t use it. This was exactly why my theme was soft rejected:

Please remove this function shortcode_empty_paragraph_fix() you cannot modify the_content, leave this to the plugins. This is a poor practice and it may break plugins.
709 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says

The functions I posted don’t modify the_content, and shortcode_unautop is a standard WordPress function. The only thing is shortcode_unautop doesn’t remove line breaks, and the first function I posted takes care of that.

20 posts
  • Has been part of the Envato Community for over 2 years
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
themebakers says

Has this change in policy been announced somewhere?

43 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
Rachata says

What should I do now , My theme was be rejected and they told me

“please make sure that you’re not stripping out any native functionality.”

I cannot use remove_filter? add_filter ?

43 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
Rachata says

Find a solution now use

function prefix_remove_wpautop( $content ) {
    $content = do_shortcode( shortcode_unautop( $content ) );
    $content = preg_replace( '#^<\/p>|^<br />|<p>$#', '', $content );
    return $content;
}</p>

thx to itsmattadams

334 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
cosmincotor says

Some shortcodes still require those stray paragraph tags to be removed, so, has anyone found a solution that will be accepted ? :)

751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

I used CSS empty to set the paragraph tag to display none. Wouldn’t that work?

32 posts
  • Has collected 1+ items on Envato Market
  • Located in United States
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 3 years
dyspersion says

How is there such a disparity? I’m just struggling to get my head around the double standards on here. Very frustrating. Is it just luck of the draw with reviewers?

Well, you can’t go back and re-review themes already in the marketplace. They just don’t have the manpower to do that. But, I would hope that those themes would be subjected to the same judgement if they submit updates. ;)

113 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 500+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
+4 more
StevenGliebe says

It’s really good that ThemeForest is checking for this now.

Now to get the bad tutorials updated or removed…

34 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 10+ items on Envato Market
+3 more
AurelienD says

Hey guys,

I’m a bit confused regarding this wpautop.

I thought that it was ok to do this?
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99);
Second question: how do you actually use this function:
function prefix_remove_wpautop( $content ) {
    $content = do_shortcode( shortcode_unautop( $content ) );
    $content = preg_replace( '#^<\/p>|^<br />|<p>$#', '', $content );
    return $content;
}
</p>
Thanks.

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