Removing tags around tags

Greedy and Ungreedy modifier: preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); Tested with this script: <?php $c = array(); $c[] = ‘<p>text</p>’; $c[] = ‘<p><div>text</div></p>’; $c[] = ‘<p><div><div>text</div></div></p>’; foreach ( $c as $content ) { $e = preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); var_dump( $e ); } Also try remove_filter( ‘the_content’, ‘wpautop’ );

wpautop on section

Please try this $c = get_the_content(); instead of: $c = the_content(); since the_content() will echo the content instead of returning it. Or try this <section class=”post-content clearfix” itemprop=”articleBody”> <?php add_filter( ‘the_content’, ‘wpautop’ ); ?> <?php the_content(); ?> <?php remove_filter( ‘the_content’, ‘wpautop’ ); ?> </section>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)