Hide default featured image on Blog Home, Category or Tag Archives
-
Hello,
I’m using the plugin to show a default featured image only for “Related Stories” at the bottom of a single post. How can I modify this function to not have default featured images show on the blog homepage, category or tag archives?`function dfi_category ( $dfi_id, $post_id ) {
if ( has_category( ‘??’, $post_id ) ) {return 0; // default animals picture
}
return $dfi_id; // the original featured image id
}
add_filter( ‘dfi_thumbnail_id’, ‘dfi_category’, 10, 2 );`
Thanks,
Michael
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide default featured image on Blog Home, Category or Tag Archives’ is closed to new replies.