• Resolved northwst

    (@northwst)


    Hello,

    I found below snippet on a previous forum question, but this doesn’t seem to be working anymore (the plugin is still trying to display 64x64px). I would like to use the thumbnails, which are 100x100px.

    Please could you confirm if the snippet has changed? Or require further amendments?

    Using the latest version of the plugin & WP.

    Thank you

    Snippet

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @northwst!

    1. Add the following code to your theme’s functions.php file or use the Code Snippets plugin:

    add_filter(  'dgwt/wcas/product/thumbnail_src', function( $src, $product_id ) {
      $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ), 'thumbnail' );
      if ( is_array( $thumbnail_url ) && !empty( $thumbnail_url[0] ) ) {
        $src = $thumbnail_url[0];
      }
      return $src;
    }, 10, 2 );

    2. Make the image container larger
    Changing the image size is not enough – you’ll also need to make the image container bigger. Add the following code to Appearance -> Customize -> Additional CSS:

    span.dgwt-wcas-si {
      width: 100px !important;
    }

    You can read more about changing the product image in FiboSearch here

    Regards,
    Kris

    Thread Starter northwst

    (@northwst)

    Thanks @c0nst,

    The most important point I think I previously missed.. Re-index! Thanks for the link..

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘64×64 Search Results Image Size’ is closed to new replies.