Centre the featured image

Hello!

On the homepage (charlottexoxo.com) all of the featured images on the posts are small and justify to the left. I want to see them big, and centred. I created the child as per your tutorial but whenever I enabled it, I lost all formatting to my site. Please help?

Hi charlottexoxo,

If creating the child theme and activating make you loose the formatting, then I guess you must be doing something wrong. Please follow this Blog and let me know.

To get bigger image, please add featured image of size 640x250(WxH) and also i saw you have added image the same larger image in the content area, but rather you can just use the same featured image by enabling it from the customizer.

Go to Appearance >> customize >> Single post/page and check the first two check box, to use the featured image in the beggininng of the single post or page.

Hope it helps!
Thanks

Hi Matty,

Thank you for your tips, I don’t really have time to change the dimensions of the images unfortunately so I’d love it to just happen automatically.

I have put my code below…

/*
Theme Name: Fashionistas Child
Theme URI: http://charlottexoxo.com/fashionistas-child/
Description: Fashionistas Child Theme
Author: Charlottexoxo
Author URI: http://charlottexoxo.com
Template: fashionistas
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: fashionistas
*/

@import url("…/fashionistas/style.css")

add_theme_support( ‘post-thumbnails’ );
add_image_size( ‘thumb-small’, 50, 50, false );
add_image_size( ‘thumb-medium’, 300, 135, false );
add_image_size( ‘thumb-featured’, 640, 250, false );

Hi

I am not sure, where have you added the add_image_size codes, it should go into your child theme’s functions.php file and another thing the image resize works only for image size greater than the size mentioned in the add_image_size for example

add_image_size( ‘thumb-medium’, 300, 135, false );

The above will resize an image greater than 300 width and 135 height and not for the images smaller than that.

Please read more about it here in the codex

Thanks