Latest News - images not cropping on homepage

Hi

Hoping you can help me with some code to get my post images to resize on the homepage. I migrated from Moesia which did this very nicely.

See www.chairdigitaleconomy.com.au for details.

Dear Amanda,

Could you please try to do the following?

  1. Open the functions.php file
  2. Go to this line add_image_size('sydney-service-thumb', 350);
  3. Then add `add_image_size(‘sydney-medium-thumb-2’, 400);
  4. Edit the widgets/fp-latest-news.php file
  5. Go to this line <?php the_post_thumbnail('sydney-medium-thumb'); ?>
  6. Change it into <?php the_post_thumbnail('sydney-medium-thumb-2'); ?>
  7. Upload the changes via FTP or cPanel
  8. Login to your site admin. Then install and activate the Regenerate Thumbnails plugin
  9. Go to Tools > Regen. Thumbnails

I hope that helps.

Regards,
Kharis

Thanks Kharis for the prompt response.

Do I change the functions.php file in Sydney theme? doesn’t seem to work to insert into the child theme?

Will I need to do this after each update?

Amanda

Dear Amanda,

You can also pass it in the child theme except the widgets/fp-latest-news.php file. It can’t be overridden from the child theme.

Regards,
Kharis

Hi Kharis

adding add_image_size(‘sydney-service-thumb’, 350); in functions.php for sydney theme gives me the following error:

Parse error: syntax error, unexpected ‘’’ (T_STRING) in /home/chairdig/staging/2/wp-content/themes/sydney/functions.php on line 54

even when I delete this line from functions.php i get the the same error.

regards
Amanda

Dear Amanda,

Thank you for updating me.

Please post the whole content of your functions.php file here https://gist.github.com so I can try to reproduce the error you’re having.

Regards,
Kharis

Thanks Kharis

Done.

A

Hello there,

Please post its URL here.

Regards,
Kharis

Hi Kharis
Sorry for delay

Hello there,

Try replace this line add_image_size(‘sydney-medium-thumb-2’, 400); in the functions.php file with this one.

Regards,
Kharis

Thank you thank you thank you :slight_smile:

this worked.