• Resolved ffortissimo

    (@ffortissimo)


    In grid-mode I’ve set ‘thumbnail size’ to hard:150×150.
    The featured images with the posts are shown 150×150.
    The placeholder image is shown 600×450.

    Where/how can I have this one resize with the settings?

    I think it is

    
    if ( ! empty( $thumb_id ) ) {
                            $image_sizes = isset( $post_thumb_setting['pcp_thumb_sizes'] ) ? $post_thumb_setting['pcp_thumb_sizes'] : '';
                            $image_src = wp_get_attachment_image_src( $thumb_id, $image_sizes );
                            $image        = $image_src[0];
                            $image_width  = $image_src[1];
                            $image_height = $image_src[2];
                    } elseif ( ! empty( $placeholder_img ) ) {
                            $image        = $placeholder_img;
                            $image_width  = 600;
                            $image_height = 450;
                    }
    

    in wp-content/plugins/post-carousel/class-post-functions.php .
    But I think that file will be overwritten by updates.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ShapedPlugin LLC

    (@shapedplugin)

    Hi @ffortissimo,

    Apologize for the delayed response. Hope you are fine.

    Please use this hook to add your desired placeholder image. Change the image URL with yours from the below code.

    add_filter( 'pcp_no_thumb_placeholder', 'pcp_no_thumb_placeholder_modified' );
    function pcp_no_thumb_placeholder_modified( $placeholder_url ) {
        
        $placeholder_url = "https://ps.w.org/post-carousel/assets/icon-256x256.png";
        
        return $placeholder_url;
    }

    Hope the above helps. Thanks.

    Thread Starter ffortissimo

    (@ffortissimo)

    whoops.. didn’t get a notification.
    Where do I add this string?

    Plugin Author ShapedPlugin LLC

    (@shapedplugin)

    Hi @ffortissimo,

    Kindly add the following PHP code in your current theme/child theme funtions.php file to use the placeholder image. See the screenshot for a better understanding.

    add_filter( 'pcp_no_thumb_placeholder', 'pcp_no_thumb_placeholder_modified' );
    function pcp_no_thumb_placeholder_modified( $placeholder_url ) {
        
        $placeholder_url = "https://ps.w.org/post-carousel/assets/icon-256x256.png";
        
        return $placeholder_url;
    }

    Hope now you can do it. Thanks.

    Thread Starter ffortissimo

    (@ffortissimo)

    That’s perfect.
    Thank you very much.

    Plugin Contributor Md Khalil Uddin

    (@khalilu)

    Hi @ffortissimo,

    We’re very glad to hear that it works perfectly now. If you are happy with our plugin and support, please share your experience in the plugin review section.

    Have a great day! Thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Placeholder doesn’t resize?’ is closed to new replies.