Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for remove paragraphs

August 11, 2014

Remove Paragraphs From Content

Here’s a really easy way on how to remove paragraphs orĀ <p></p> from the WordPress content.

In the WordPress loop, look for the code ‘the_content().’ Add this command just before it:

remove_filter ('the_content', 'wpautop');
the_content();

remove_filter ('the_content', 'wpautop'); the_content();

That essentially removes all the paragraphs from the WordPress content.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021