in WordPress? - html 🤛🏽 🤮 🏓All geek questions in one placeHow to remove extra <p> in WordPress?I am new to Wordpress and am currently developing a theme on it. I noticed that Wordpress is adding <p> tags throughout the page. Do you know any plugin or workaround to avoid this?+4html php wordpressOzzy Jun 21 '10 at 15:31source share3 answersAdd this to your functions.php , this will give the result you are looking for: remove_filter('the_content', 'wpautop'); +14gasoved Jun 23 '10 at 1:11source shareTry this if you have html code in the $html_code variable $html_code = preg_replace('/<\/?p>/','', $html_code); +1cypher Jun 21 '10 at 15:34source shareThe WP Unformatted module will remove this filter by default.0ceejayoz Jun 21 '10 at 15:49source shareSource: https://habr.com/ru/post/1313411/More articles:strategy template template - c ++jquery: window.location.reload () does not allow $ .post () to work - jqueryAddress Difference Algorithm - emailHow to wait for jQuery's load function to display loaded content before executing the callback function - jqueryBest solution for using AOP with OSGI? - javaProblem with the MFMailComposeViewController warning “No email accounts” - SDK 3.0 vs SDK 4.0 - iphoneHow to set an alarm that will disappear even if I restart my Android phone? - androidfunction templates with arguments of type typedef of the template - c ++Windows application opens a console and writes to it - c #qt - In QGraphicsScene, I cannot get the correct item - qtAll Articles
I am new to Wordpress and am currently developing a theme on it. I noticed that Wordpress is adding <p> tags throughout the page. Do you know any plugin or workaround to avoid this?
<p>
Add this to your functions.php , this will give the result you are looking for:
remove_filter('the_content', 'wpautop');
Try this if you have html code in the $html_code variable
$html_code
$html_code = preg_replace('/<\/?p>/','', $html_code);
The WP Unformatted module will remove this filter by default.
Source: https://habr.com/ru/post/1313411/More articles:strategy template template - c ++jquery: window.location.reload () does not allow $ .post () to work - jqueryAddress Difference Algorithm - emailHow to wait for jQuery's load function to display loaded content before executing the callback function - jqueryBest solution for using AOP with OSGI? - javaProblem with the MFMailComposeViewController warning “No email accounts” - SDK 3.0 vs SDK 4.0 - iphoneHow to set an alarm that will disappear even if I restart my Android phone? - androidfunction templates with arguments of type typedef of the template - c ++Windows application opens a console and writes to it - c #qt - In QGraphicsScene, I cannot get the correct item - qtAll Articles