Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hello everyone,
Does anybody know, how to do to put an image on the front in an article, which is smaller than the original image size download WordPress.
In advance thank you to you.
Best regards.
Philippe
Offline
Do you mean in the blog post itself or the Featured Image that can appear before a blog expert on the Blog page?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Good evening,
Thank you to you for your answer, I just found it was necessary to change the image size in functions.php
if (!isset($content_width)){
$content_width = 450;
Good evening.
Regards,
Philippe
Offline
Hmm. That doesn't seem right. But if it's working for you...
Just remember that if you change your theme, export, and upload again, then those changes will be wiped out (unless you're doing this with a child theme.)
I'm assuming you were talking about the Featured Image that appears on the Blog page, since individual images in posts can be set at a variety of sizes.
If so, there may be an easier way of doing this via custom css
This appears to work. Adjust size to your liking using percentage or a specific pixel width
.post_thumbnail {
width: 50%;
}
or
.post_thumbnail {
width: 400px;
}
You could either add this to the styles.css file in the theme (which will get overwritten by any update unless you're using a child theme) or, if you're already using phplugins you could add it to the custom.css file. Or you can get the Custom CSS WordPress plugin and add it that way.
or you could control the featured image size in a child theme's functions.php file as outlined here:
https://slocumthemes.com/2014/05/adjust … wordpress/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hello,
Thank you for all that information, it helped me a lot.
Yes it worked for me, but I still handed the file as it was originally.
I added the code in my custom.css .post_thumbnail and it works flawlessly.
Good evening.
Regards,
Philippe
Offline
Yeah, you shouldn't be messing with the $content_width value in functions.php. Various WordPress functions depend on it, and it's something that isn't meant to be user-configurable.
Offline
Pages: 1