Reply To: Use Sections -> auto adding paragraphs

Home Forums Support Use Sections -> auto adding paragraphs Reply To: Use Sections -> auto adding paragraphs

Home Forums Support Use Sections -> auto adding paragraphs Reply To: Use Sections -> auto adding paragraphs

#202765
Tom
Lead Developer
Lead Developer

You can add this function to your site:

if ( ! function_exists( 'generate_sections_filter_admin_init' ) ) :
add_action( 'admin_init','generate_sections_filter_admin_init' );
function generate_sections_filter_admin_init()
{
	if ( user_can_richedit() ) {
		add_filter( 'generate_section_content', 'convert_smilies'    );
		add_filter( 'generate_section_content', 'convert_chars'      );
		add_filter( 'generate_section_content', 'wpautop'            );
		add_filter( 'generate_section_content', 'shortcode_unautop'  );
		add_filter( 'generate_section_content', 'prepend_attachment' );
	}
}
endif;

Then remove the wpautop line.

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/