How to Remove HTML Elements from Post Excerpt?
At first glance, this appears to be an XY Problem. If you simply want to increase the length of the excerpt auto-generated from the post content, you can use the excerpt_length hook in functions.php. function modify_excerpt_length( $length ) { return 300; } add_filter( ‘excerpt_length’, ‘modify_excerpt_length’, 99 ); Then simply call the excerpt in your template: … Read more