61 posts
  • Sells items exclusively on Envato Market
  • Has sold $10,000+ on Envato Market
  • Located in Europe
  • Has been part of the Envato Community for over 3 years
+3 more
RafalBorowski says

There are so many threads on this forum about wpautop and so many different answers that I would like to get one actually from envato staff. Because with all respect to all authors out there I (and probably other authors too) would like a definitive answer on this question:

What code THAT DOES EXACTLY THE SAME THING as

remove_filter( 'the_content', 'wpautop' );

should we use?

And I do not mean something like that, almost like that, kinda like that but EXACTLY this. Because while many of you might write “this is a core functionality and if you touch this you will die and the whole world will explode” you actually cannot be so blind to tell someone that placing p and br tags in every possible place and wrapping every single thing in it is a valid, semantic and logical thing to do. Well… maybe in 3rd grade IT class… but then again KNOCK KNOCK… hello… the real world is here.

And another question I would like to get an answer to from the staff is: If wordpress codex here actually says “hey some people don’t like it. If you don’t like it too here’s how to turn it off – you are welcome” why can’t we use it? It’s not a hack, it’s not a secretly written exploit to crash the whole universe. It’s on the official wordpress codex page. So if they say – here you go – why can’t we?

And the third question is: Since we should be consistent with creating themes and stick to the codex then how other solution for that problem (it there is any that works and does the same) is better than the official one? I mean… I could probably kill a fly with cannon, laser gun or a F35 jet but… why?

1477 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

Check this out: https://gist.github.com/bitfade/4555047

Regarding your question about what is written in the Codex, note that it’s a guidance for a personal use, as a developer you have a responsibility to not alter the WordPress in a way that might affect the functionality of 3rd party plugins/themes.

61 posts
  • Sells items exclusively on Envato Market
  • Has sold $10,000+ on Envato Market
  • Located in Europe
  • Has been part of the Envato Community for over 3 years
+3 more
RafalBorowski says

Check this out: https://gist.github.com/bitfade/4555047

Thanks, but that does still not solve the problem like adding p or br between (before and after) shortcodes, in blockquotes etc. It just doesn’t do the same thing as remove_filter( ‘the_content’, ‘wpautop’ );

61 posts
  • Sells items exclusively on Envato Market
  • Has sold $10,000+ on Envato Market
  • Located in Europe
  • Has been part of the Envato Community for over 3 years
+3 more
RafalBorowski says

If I have shortcodes in a readable way like:

shortcode_one

It will put a br between them. Br disappear when i join those shortcodes. The problem is with lots of them and other markup it’s completely unreadable. Is that how everyone do their themes? User has to write one thing after another?

61 posts
  • Sells items exclusively on Envato Market
  • Has sold $10,000+ on Envato Market
  • Located in Europe
  • Has been part of the Envato Community for over 3 years
+3 more
RafalBorowski says

WP inserts for example p tag after header or before or after some shortcodes a <br /> – not even a closed one (/ is there because forum inserts in automatically – I guess this forum is smarter than WP). How to remove that?

492 posts
  • Has referred 1000+ 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
+8 more
pixelentity says


Check this out: https://gist.github.com/bitfade/4555047
Thanks, but that does still not solve the problem like adding p or br between (before and after) shortcodes
that’s exactly what that code does. You cannot strip whole “autop” feature by removing the filter or using code which has the same effect, that would break other plugins and your theme would not be accepted here.
by
by
by
by
by
by