Skip to content

Defter

  • Home

editor

editorpatchSnippet

Auto Paragraph in Content and Excerpt Editors, How to Get Rid Of It?

WordPress and most of the editors from plugins or themes puts auto HTML tags, mostly
for the new line when user hits enter in editor window. That feature causes syntax errors of javascripts or css lines. This is how to get rid of it:

Save those lines in functions.php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

Comment 14 March 201925 March 2019 Geloda

Posts navigation

Newer posts →
Website Built with WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Defter
    • Already have a WordPress.com account? Log in now.
    • Defter
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
Design a site like this with WordPress.com
Get started