Change default crop

Posted in: Newspaper
Post count: 21

Hey there, I’d like to change the default top/center crop parameter to center/center. I saw that I could do it changing the td_config.php BUT I just can’t edit the file. I’m in CPanel and it doesn’t let me edit the file. What are my options?

Post count: 35449

Hi,

In order to make this crop center center you need to edit a theme file , please go in:
\wp-content\themes\Newspaper\includes\td_config.php
Go on line 1532 to td_api_thumb::add(‘td_218x150’, and set there center center
https://www.screencast.com/t/LqQM6pQChVG1
https://www.screencast.com/t/LBxgi7XdaC77
From now on all thumbs with this size will be crop center center, but you’ll need to regenerate all future image set until now.
In order to do that you need to install regenerate Thumbnails
select the feature image and click on regenerate
-> https://www.screencast.com/t/wut3hSoLW
https://www.screencast.com/t/cjGzRstlxxi

Hope this will help you.

Thanks.

Post count: 21

Yeah, sounds good…but the edit button in CPanel is greyed out! Every other file can be edited but not this one! I wonder why?

Post count: 35449

Hi,

Please contact your host and ask them about this problem, usually this is happening when you do not have permission to that file.

Thank you.

Post count: 21

Hmm, I downloaded the file, changed it and re-uploaded it. Now, everything should be fine but after I installed the Regenerate Thumbnails and run it my images won’t load in the Media Library…and the featured image on the page looks the same, the cropping didn’t changed 🙁 I’ll try it again…

Post count: 35449

Hi,

Please make sure that you clear all cache after you update the file.

Thanks.

Post count: 21

Yeah, well it seems something doesn’t works really well. How could I revert the td-config.php file to the original state?

Post count: 21

OK, I just found the old file…damn, I uninstalled the theme and then re-installed everything…just to lose every configuration 🙁

Post count: 35449

There was no need to reinstall the theme, all you had to do was to set back “canter, top” in td_config.php file.

Thanks.

Post count: 21

I know that now…too late 🙂 anyway, I’ll try it again!

Post count: 21

Now, I tried it once again 🙂 everything is fine…except the cropping didn’t changed at all! Let’s make this clear, I’m trying to change the cropping of this images

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

Hi,

So if I’m right you want to change the center center for the image -> https://www.screencast.com/t/rLBl9wLSPio you can check in Newspaper>theme panel>Block settings > thumbs on modules/blocks there are all the thumbs size for all blocks, all you need to do is to look on what block you want to crop the image center center , for example big grid 1 -> https://www.screencast.com/t/tDXDeTSfdwyI after that set in td_config.php in td_265x198 and/or td_534x462 and set crop center center

Hope this will help you better!
Thanks.

Post count: 21

OK, thanks! Will try that!

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