Resize theme thumbnails

Home Forums Spacious Pro Resize theme thumbnails

This topic contains 5 replies, has 2 voices, and was last updated by  Bishal Napit 2 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1282289

    Derek
    Participant

    I have regenerated all my images to new thumbnail sizes, but I can’t find a way to change the default sizes in Spacious Pro. I would like to change the medium size in SP from 270 x270 to 400 x 300.

    I’m sure there is a simple function to do this but I can’t find it in previous posts in this forum.

    Can you help?

    #1282345

    Bishal Napit
    Moderator

    Hi, Derek.

    For this, you can create a child theme for your site and the crop the image via this function: add_image_size('spacious-medium-child', 400, 300, true); in the ‘functions.php’ file of the child theme. Now after that, you need to find the registered size in parent theme and duplicate those files in the child theme, ie, the size to be found is featured-blog-medium, which need to be replaced with spacious-medium-child. Hope you have got the idea. Thanks.

    #1282377

    Derek
    Participant

    THanks Bishal, but I can’t seem to get it to work. This is the code I used.

    add_image_size('spacious-medium-child', 400, 300, true );
    
    // Cropping the images to different sizes to be used in the theme
    	add_image_size( 'featured-blog-large', 750, 350, true );
    	add_image_size( 'spacious-medium-child', 400, 300, true  );
    	add_image_size( 'featured', 642, 300, true );
    	add_image_size( 'featured-blog-medium-small', 230, 230, true );

    I’m not sure what I have done wrong.

    #1282433

    Bishal Napit
    Moderator

    Hi, Derek.

    You need to add that provided code in the ‘functions.php’ file of the child theme. After that, you can search for the files displaying the featured-blog-medium to change to spacious-medium-child. For eg: in the file ‘content-blog-image-medium.php’ via your child theme. Also, using the ‘Regenerate Thumbnails’ plugin is required to regenerate all of your images after this new size has been registered. Thanks.

    #1282450

    Derek
    Participant

    Ok, got it. Thanks.

    #1282462

    Bishal Napit
    Moderator

    Hi, Derek.

    If there are any further query regarding to our theme, then, please feel free to post them. Thanks.

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

You must be logged in to reply to this topic.