How to hide and content from auto-generated excerpts?
To filter the content only when an auto-excerpt is generated you have to chain the hooks: Hook into get_the_excerpt and register a filter for the_content. In the second filter remove both elements and their content before the excerpt can see it. Sample: add_filter( ‘get_the_excerpt’, ‘t5_excerpt_clean_up’, 1 ); /** * Register handler for auto-generated excerpt. * … Read more