Do you mean custom image when no thumbnail found?
Please add this code to file functions.php of your active theme:
// CVPro - Custom image when no thumbnail found
add_filter( 'pt_cv_field_thumbnail_not_found', 'cvp_field_thumbnail_not_found', 100, 4 );
function cvp_field_thumbnail_not_found( $args, $post, $dimensions, $gargs ) {
$args = sprintf( '<img src="%s" width="%s">', 'YOUR_CUSTOM_IMAGE_URL', $dimensions[ 0 ] );
return $args;
}
Best regards,
Thanks lots for this and taking the time to reply. However, this overrides the ‘substitute image’ setting under Thumbnails in the Content Views display settings. Is there a way to only show the custom image when there is no graphic whatsoever in the post?
Hi,
I have purchased this wonderful plugin as well and would like to know if there is an option to the above question.
I would like to know, when there is no image found, how to replace the default (no image) icon.
Thanks.
Hi guys,
Please add this code to file functions.php of your active theme:
// CVPro - Custom default image when no thumbnail/image found
add_filter( 'pt_cv_default_image', 'cvp_default_image', 100, 1 );
function cvp_default_image( $args ) {
$args = 'YOUR_IMAGE_URL';
return $args;
}
Best regards,