Hi support,
I have added a new size to be used as my featured image on single post pages (Post template style 1).
It appears in the themes panel settings in thumbnails, and I have regenerated thumbnails, but the featured image size does not change (only shows it as 300px by 184px). What file do I need to edit to add this code “td_326x200”?
What is the module name or file name to set featured image sizes? I have edited other module templates successfully, but don’t know which file holds the “featured image” code.
Will this also change the YouTube image thumbnail crop settings when a YouTube video is added to the featured image field in a post?
Many thanks,
John
PS – This is the code I used to add the new image size, which appears under “Thumbs on modules and blocks”.
td_api_thumb::add('td_326x200',
array(
'name' => 'td_326x200',
'width' => 326,
'height' => 200,
'crop' => array('center', 'top'),
'post_format_icon_size' => 'normal',
'used_on' => array(
'Post template 1'
)
)
);
Hello bowman9991,
Please noticed that if you want to change the dimensions of the featured image according to your blocks, you have to change the structure of each thumb from td_config.php where you can find all the thumbs created for the theme, like this -> http://screencast.com/t/siMGnfUsO3y or you can create another one. Please notice that is not a simple task and if you are not aware of the steps in this regard, please consider hiring a freelancer/developer to help you because we cannot provide customization services at the moment, sorry! After you have created these thumbs you have to use the Regenerate Thumbnails & Force Regenerate plugin for good results.
Hope this helps!
Thank you for the message!
Hi Catalin,
Not sure if you read my full post?! I have already created the new feature image size (just like I did for other modules) in td_config. In the case of modules, you need to add a second piece of code inside the template itself to make the new size work. I’m asking where the “Post style 1 template php file” is? In this file, just like the modules, there should be an “echo image” reference in the PHP that I need to change to td_326x200 (from the old size).
I will of course regenerate thumbs when I have made this adjustment first…
Cheers,
John
Worked it out. For those who find this thread and want to change the feature image size.
First add the new size to the td_config first (code above) then find your post template style. I was using the post style template 1, which is located here (not sure why they’re called loop single!):
/wp-content/themes/Newspaper/loop-single-1.php
On line 51, change:
echo $td_mod_single->get_image('medium');
TO
echo $td_mod_single->get_image('td_326x200');
Change the TD reference to whatever size you have already added to the tp_config file.
Regenerate your thumbnails and it should be there.
Cheers,
John
-
This reply was modified 10 years by
bowman9991.
-
This reply was modified 10 years by
bowman9991.
-
This reply was modified 10 years by
bowman9991.