WordPressで、pタグの自動挿入を無効化する方法
functions.phpの記述
下記コードをfunctions.phpに記述することで、pタグやbrタグの自動挿入・自動整形を無効化することができます。
<?php
// 記事
remove_filter('the_content', 'wpautop');
// タイトル
remove_filter('the_title', 'wpautop');
// 抜粋
remove_filter('the_excerpt', 'wpautop');
// コメント欄
remove_filter('comment_text', 'wpautop');
?>


