Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #195808

    I’d like to use SQUARE images on my grid blog, instead of the “portfolio” size images, which are slightly wider than they are tall. In the theme’s functions file, I can see that the “masonry” size crops to a square.

    I’ve tried to modify the blog.php template file, changing “portfolio” to “masonry” but this doesn’t have any effect.

    Can you please point me in the right direction?


    Hey fitzpatrick512!

    Can you post a screenshot and show the changes you would like to make? I am not sure if i understood you clearly

    Best regards,

    This reply has been marked as private.

    Is my question clear now?



    After changing the portfolio thumbnail size on functions.php, you need to regenerate the thumbnails using this plugin:

    You can add this on your custom.css or Quick CSS:

    .attachment-portfolio.wp-post-image {
    min-height: 208px;

    This will make the thumbnails square on this page:

    Best regards,


    I don’t want to change the portfolio image size, I want to use a different size on the blog.php page. I only want the blog images to be squares. The portfolio images should continue to use the portfolio size.

    I want to change the size being called for the grid thumbs in blog.php


    How can I change the image size that is used on blog.php ? Where is the image size called there for the blog grid?

    I DO NOT want to change the size being generated in functions.php, because I want to continue to use those sizes on my portfolio pages, I ONLY want to change the size of the images on the blog.



    Edit config-templatebuilder > avia-shortcodes > postslider.php, find this code on line 240:

    if($preview_mode == 'auto') $image_size = 'portfolio';

    Below, add this code:

    if($preview_mode == 'auto') $image_size_blog = 'blog_grid';

    Go to line 277, find this code:

    $thumbnail = get_the_post_thumbnail( $the_id, $image_size );

    Replace it with:

    $thumbnail = get_the_post_thumbnail( $the_id, $image_size_blog );

    Edit functions.php, add this code at the very bottom:

    $avia_config['imgSize']['blog_grid']= array('width'=>208, 'height'=>208 ); // blog grid images

    Regenerate the thumbnails. The Blog Grid will now use the “blog_grid” thumbnail with 208 by 208 px dimension.



    thanks for this!



    Glad it worked. :)


Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Square thumbnails on grid blog’ is closed to new replies.