remove empty Excerpt in Custom Taxonomy archive pages
-
To avoid excerpts to display when they are empty, I use the following filter in functions.php that works perfectly:
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
However, I would like to remove empty excerpts only for the archive pages of my custom taxonomy (not the blog or others). I tried the following code since is a custom category, but it does not work:
if ( is_tax('custom-taxonomy') ) { remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' ); }
What am I missing, any idea?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘remove empty Excerpt in Custom Taxonomy archive pages’ is closed to new replies.