Cod for functions php

Posted in: Newspaper
Post count: 55

Add the following code at the end of the functions.php which is located in the theme folder, the code will automatically compress each thumbnail to 50%:

add_filter( 'jpeg_quality', create_function('', 'return 50;' ) );
este corect unde am pus codul ?
http://prntscr.com/mcbe0b

  • This topic was modified 7 years by Robert90.
Post count: 22421

No, the code is not added correctly. Add it after all the closing ‘}’
Multumesc.

Post count: 55

in tutorialul de pe webite ar fi bine sa puneti o poza si subliniat codul asa inteleg chiar toti oamenii unde sa puna un cod sau cel mai probabil facut un videotuorial in tutorialul de aici https://forum.tagdiv.com/how-to-make-the-site-faster/

acum sper ca este corect http://prntscr.com/md8s72

  • This reply was modified 7 years by Robert90.
  • This reply was modified 7 years by Robert90.
Post count: 35449

Hi Robert90,

Yes now you set well the code, now you need to use the Force Regenerate Thumbnails plugin to regenerate all thumbs.

Thank you!

Post count: 55

am facut tot am vazut la voi pe site doar ca nu intelege-am unde sa pun codul

Post count: 35449

Hi,

Will be best if you’ll make those changes in child theme, in this way you’ll not lose the changes when you’ll make an update to the theme.
-> https://www.screencast.com/t/XKpkHKmw

Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.