I removed automatic formatting in my WP site by adding this to functions.php:
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
Now I need to add it back into one section only. On page.php, I want to replace the_content with wpautop formatted content.
I replaced this:
<section class="post-content clearfix" itemprop="articleBody"> <?php the_content(); ?> </section>
<section class="post-content clearfix" itemprop="articleBody"> <?php $c = the_content(); $format_c = wpautop( $c, false ); echo ($format_c); ?> </section>
Unfortunately it is not adding paragraph tags here. Can anyone help me to add paragraph tags only at this location in my theme? I do not want them in the page custom templates or any of the posts.