Remove function from child theme
-
Hi, my parent theme has a function that replaces the opening <p> with <p class=”lead”>. I’d like to remove this functionality altogether in my child theme. I’ve tried this a couple different ways in my child theme functions.php, but I can’t seem to get it right. Any help would be much appreciated. The parent theme function is:
// Add lead class to first paragraph function wp_bootstrap_first_paragraph( $content ){ global $post; // if we're on the homepage, don't add the lead class to the first paragraph of text if( is_page_template( 'page-homepage.php' ) ) return $content; else return preg_replace('/<p([^>]+)?>/', '<p$1 class="lead">', $content, 1); } add_filter( 'the_content', 'wp_bootstrap_first_paragraph' );
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Remove function from child theme’ is closed to new replies.