Changing thumb generation from top to center in child-theme

Posted in: Newspaper
Post count: 19

Hello,

I want the 1068×580 version to be cropped center center, not top as it is by default.
I found this in includes/td_config.php
So here i can change it, BUT i would like to avoid a core hack of course.
How can I overwrite this in the functions.php of my child-theme?

(I am unfamiliar with this whole td_api thing. In the old version I see it was solved in the “traditional” way with add_image_size();, but this is here is overcoming my knowledge 🙂

td_api_thumb::add('td_1068x580',
array(
'name' => 'td_1068x580',
'width' => 1068,
'height' => 580,
'crop' => array('center', 'top'),
'post_format_icon_size' => 'normal',
'used_on' => array(
'Slide - 3 column'
)
)

Post count: 3

Hi,

just change ‘crop’ => array(‘center’, ‘top’), to ‘crop’ => array(‘center’, ‘center’),

so the code would look like this:

td_api_thumb::add('td_1068x580',
array(
'name' => 'td_1068x580',
'width' => 1068,
'height' => 580,
'crop' => array('center', 'center'),
'post_format_icon_size' => 'normal',
'used_on' => array(
'Slide - 3 column'
)
)
Post count: 19

I am afraid to say that this time the answer completely ignored my question before the code 🙂
What you say is what I have done already, but I want to know if I can do it without hacking the core.
If I simply copy these lines into my child functions.php it gives me an error, and I would like to know if there is a solution to overwrite it from my child-theme?

Take off one more time, maybe in the second attempt you’ll save me again :))

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