Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Content Views

    (@pt-guy)

    Do you mean custom image when no thumbnail found?

    Thread Starter johnsteve5

    (@johnsteve5)

    Yes, exactly.

    Plugin Author Content Views

    (@pt-guy)

    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,

    Thread Starter johnsteve5

    (@johnsteve5)

    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.

    Plugin Author Content Views

    (@pt-guy)

    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,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fallback thumbnail Content Views’ is closed to new replies.