Category default image and the single post default image
-
nice plugin…
I am trying to set up one default image for the category and i managed by pasting in functions.php of my themefunction dfi_category( $dfi_id ) { if ( has_category( '4' ) ) { return 51; // the image id } return $dfi_id; // the original featured image id } add_filter('dfi_thumbnail_id', 'dfi_category' );
now my question is this… if i set in my category id=4 in any post a featured image it overrides the category main default image
I want to display the featured image of the category on the header and under it each post to have the default features image or a custom one. But i want the category featured image that i set in the functions.php not to be changed when i changethe post featured images of that category
this is what i use to display the featured image in the header
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail();
}
?>https://www.ads-software.com/plugins/default-featured-image/
- The topic ‘Category default image and the single post default image’ is closed to new replies.