Hello,
I have modified the file loop-single.php.
if (!empty(td_global::$load_featured_img_from_template))
{
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else
{
echo $td_mod_single->get_image(‘td_1068x0’);
echo $td_mod_single->get_image(‘td_696x0’);
}
?>
But the same picture is always output.
Regards
Fox
Hi,
I don’t understand what exactly you are trying to do. That is the thumb size used for some post templates, including the default one that you mention. It is worth mentioning that the post content when a sidebar is used is 696px. The thumbnail that you call will be displayed, but limited by the post content and it will look the same
– https://www.screencast.com/t/YrGWpCFzS8gh
Thanks
So I have unfortunately only small pictures available.
That’s why I use Regenerate Thumbnails and have Thumbs in 1068 and 696.
Unfortunately, the page is only shown as the original size.
That’s why I want to use in the theme the loop-single.php the size td_696x0 ‘, which is created by regenerated thumbnails. Unfortunately the original image is always displayed.
Hi,
If the image is smaller then it will be displayed as it is. It will not get enlarged or stretched to fit by the theme. Some thumb sizes will be created only if the image is big enough to allow it
– https://forum.tagdiv.com/thumbnails-vs-featured-image-size/
You could simply leave it as it is, or use a different post template like template 1 which displays a smaller image size
– https://forum.tagdiv.com/post-templates-2/
Or templates that do not display the featured image on the post page, like template 5.
You could also try plugins that maybe can stretch the images, but that could result in quality loss.
Thanks
Hello Simon,
I already read the post. This is not what i looking for.
I have created the images by regenerating thumbnail on the dimensions 1068×580 -> You see, i have a these thumbnail. http://de.share-your-photo.com/b57791f54a
Now I would like to display the thumbnail with the name Depositphotos_2739528_xs-1068×580.jpg. For this I use echo $td_mod_single->get_image(‘td_1068x0’);
The Image Depositphotos_2739528_xs-1068×580.jpg is not displayed.
The wrong picture is displayed Depositphotos_2739528_xs http://share-your-photo.com/1707f1e79a
How can i show the thumbnail Depositphotos_2739528_xs-1068×580.jpg?
-
This reply was modified 9 years by
tomfox.
Hi,
I still don’t know what exactly you are trying to achieve with the default post template. I have tried it like you and the thumbnail size if it exists is called in the post page
– https://www.screencast.com/t/eSFCziLz
The process is simple, you upload a featured image and the theme will create the necessary thumb sizes if they are enabled in the theme panel
– https://forum.tagdiv.com/theme-thumbs/
These thumbs will be then used on the blocks, post pages etc.
Thanks
Hello Simon,
thank you for the comments.
Exactly that does not happen with me.
The Thumbnail size exists (look here: http://de.share-your-photo.com/b57791f54a) but it will not show (look here: http://de.share-your-photo.com/1707f1e79a)
Here for Eexample:
In this Post: http://www.familienjoe.com/2017/06/20/hallo-welt/ have to show 2 Thumbnails.
echo $td_mod_single->get_image(‘td_1068x0’);
echo $td_mod_single->get_image(‘td_696x0’);
Both are available:
http://www.familienjoe.com/wp-content/uploads/2017/06/Depositphotos_2739528_xs-1068×580.jpg
and
http://www.familienjoe.com/wp-content/uploads/2017/06/Depositphotos_2739528_xs-696×385.jpg
But it will show two times the Featured Image:
http://www.familienjoe.com/wp-content/uploads/2017/06/Depositphotos_2739528_xs.jpg
Hi,
Please corrected me if I misunderstand. The image used and set as featured image seems to have originally this size
– https://www.screencast.com/t/uepcEPzsnS9h
This size is not even the minimum size required for the theme to create the smaller thumbnail for the default post template
– https://www.screencast.com/t/LPeoCDIP
You can try as a test to set a bigger image as featured, and the try what you want to do. This will work properly.
Thanks
Dear Simon,
I do not know why you always come back to the featured image?
The question is:
I have a thumbnail in the dimensions 696×385
http://www.familienjoe.com/wp-content/uploads/2017/06/Depositphotos_2739528_xs-696×385.jpg
Why is it using the code echo $ td_mod_single-> get_image (‘td_696x0’); not displayed?
This is a simple question.
Hi,
I have tried calling different thumbnail sizes in the post template and it is working for me. Some examples
– https://www.screencast.com/t/SzuTcMGivLh
– https://www.screencast.com/t/kvV2TenPa4P
– https://www.screencast.com/t/Z67wzklIywr
– https://www.screencast.com/t/twuau90RG
These thumbnail sizes are all available
– https://www.screencast.com/t/yyurNDy5
Maybe you can try this a different way. From what I can tell those bigger thumbnails are simply stretched from the original image. The same thing can be achieved with a code like this
– https://www.screencast.com/t/tura62SR5v
The code will affect each featured image on the default post template.
.td-post-template-default
.td-post-featured-image img {
width: 100%;
}
Thanks