• Resolved trialgtx

    (@trialgtx)


    I have a problem with post thumbnails, when I changed the theme to Neve, the aspect ratio for post thumbnails also changed, and when loading thumbnails in the old format, the site started cropping them. //

    I found an article on your site with instructions on how to change the image size by adding the code to function.php child themes, but it didn’t help and nothing changed.

    https://docs.themeisle.com/article/1269-how-to-change-image-size-in-neve

    Then, for the sake of interest, I tried to insert the code into the main theme and everything worked! I can’t leave it like this, because I won’t be able to update the theme. What should I do to make the code work?, because I won’t be able to update the theme. What should I do to make the code work?

    Upd. I use code

    function change_blog_image_size() {
    	remove_image_size( 'neve-blog' );
    	add_image_size( 'neve-blog', 1060, 530, true );
    }
    add_action( 'after_setup_theme', 'change_blog_image_size' );

    it’s work only in func.php of MAIN theme, not for child

    • This topic was modified 5 years, 7 months ago by trialgtx.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @trialgtx,

    It should work with the child theme too if you haven’t changed something else that could make an effect on this functionality. As we are not familiar with the child theme and changes that you made there we cannot advise that I would just recommend playing with the functions that you have there to find which could be conflicting one that prevents this one to work as expected.

    Thread Starter trialgtx

    (@trialgtx)

    You’re familiar with the topic and you know what you changed there because you did this daughter topic and I said it from your website. And as a result, there are no changes in it.

    Hi @trialgtx,

    If the code does not work for some reason on the child theme you created you do not have other reasons for using a child theme you can apply this custom code or any other custom code using this method: https://docs.themeisle.com/article/889-how-to-create-a-site-specific-plugin

    This way you’ll be able to update the Neve theme without losing your custom code.

    I hope it helps!

    You can try to add_theme_support:

    add_action( 'after_setup_theme', 'my_child_theme_image_size', 11 );
    function my_child_theme_image_size() {
            add_theme_support( 'neve-blog' );
    	remove_image_size( 'neve-blog' ); 
    	add_image_size( 'neve-blog', 1060, 530, true );
    }

    I had trouble getting it to work following the Theme Isle tutorial as well until I came across this topic: https://ww.wp.xz.cn/support/topic/featured-image-is-being-cropped/

    Actually, reading again, I realised you want your featured images uncropped, so you will want to remove the “true” setting, as shown here: Crop Mode

    So, if it’s still an issue, you could try this in your child functions:

    add_action( 'after_setup_theme', 'my_child_theme_image_size', 11 );
    function my_child_theme_image_size() {
            add_theme_support( 'neve-blog' );
    	remove_image_size( 'neve-blog' ); 
    	add_image_size( 'neve-blog', 1060, 530 );
    }
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cropped image blog post’ is closed to new replies.