2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

[...] cough bad practice…

ThemeForest approved :P

3437 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says


[...] cough bad practice…
ThemeForest approved :P

its more of a UX bad practice than code bad practice

also dont get me started

137 posts WordPress Wizard
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured on Envato Market
  • Won a Most Wanted contest
+6 more
CODE9RS says


[...] cough bad practice…

ThemeForest approved :P

Yeah, but this technique works fine, but it’s more a hack than a “legitime” technique, since it disable filters of WordPress.

I really liked the @OrganicBeeMedia solution, looks really easier than the filter technique.

I’ll test it here, thanks for the suggestion OrganicBeeMedia.

Cheers, Rafael Angeline

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

Totally agree it’s not very convenient to have to wrap shortcodes with another shortcode.

@ Chris – need to work on my sarcasm.

3437 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

Totally agree it’s not very convenient to have to wrap shortcodes with another shortcode. @ Chris – need to work on my sarcasm.

its to hard to project through type, maybe we can invent tone of voice typing?

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

:D

3437 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

you want to filter your shortcodes that dont need to be texturized through a filter…
add_filter( 'no_texturize_shortcodes', 'your_prefix_no_texturize' );

function your_prefix_no_texturize( $fix_stuff ) {
    $fix_stuff[] = array('make' , 'this', 'a',  'array');
    return $fix_stuff;
}

see wp-includes/formating.php line 60

ps that original code is NOT mine

NOTE : i haven’t tested this and typed it in here so there may be errors

so to get back on topic and make myself a little clearer

the array is spouse to be an array of shortcodes that you don’t want texturized, why because not all shortcodes need it removed

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

I use this.

function framework_remove_wpautop( $content ) {
    $content = do_shortcode( shortcode_unautop( $content ) );
    $content = preg_replace( '#^<\/p>|^<br />|<p>$#', '', $content );
    return $content;
}
</p>
3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi guys,

never interfere/remove wp core filters. Also if your code work for your theme, it can break many plugins.

Build your themes and respect WordPress!

Parker

3437 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

Hi guys,

never interfere/remove wp core filters. Also if your code work for your theme, it can break many plugins.

Build your themes and respect WordPress!

Parker

Hey Parker,

if you actually read the code he’s using you’ll see thats not removing wpautop at all its moving the position its called.

actually neither are the ones Ive said are bad practice, well they kind of are but they are forcing users to wrap there shortcodes [raw][shortcde][/raw]

now the tittle of the threads misleading as hes not actually asking how to remove wpautop(as that code works) rather than wptexturize which there are filter you can run any type of tag through i.e html tags are also ran through the filters by default

no_texturize_shortcodes & no_texturize_tag located in multiple places in the core but specifically(where we’d need it) in wp-includes/formating.php in the wptexturize function ;-)

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