Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change size featured images for different locations
- This topic has 8 replies, 3 voices, and was last updated 10 years, 1 month ago by
webkompaan.
-
AuthorPosts
-
September 13, 2016 at 2:30 am #193065
webkompaan
ParticipantI'm using the Digital Pro theme which uses a specific size for its featured images. On the homepage I use the Front Page 3 Widget Area to display content blocks, using the Custom Post Widget plugin, so it is easier for my client to add content. These are normal custom posts with their own featured images. I need these featured images to have a fixed cropped size. How can I do this?
Example: http://pix.toile-libre.org/upload/original/1473755333.jpg
September 13, 2016 at 1:09 pm #193110pokem23
MemberThis is a special feature of the pokemon go game that by using the pokemon Go GPS hack you can relocate your location and then it would be easy for you to get the maximum number of pokemons from different places.
September 13, 2016 at 8:43 pm #193134Christoph
MemberHi,
if I'm understanding you correctly, you'd just have to add that image size to functions.php.
e.g.add_image_size( 'featured', 300, 100, TRUE );
https://developer.wordpress.org/reference/functions/add_image_size/
September 14, 2016 at 2:10 am #193149webkompaan
ParticipantI did that, and the thumbs are created, but they are not used in that place. The images are still different in size and there are no other images used in those posts.
September 14, 2016 at 7:31 am #193152Christoph
MemberLet me just check a few things:
Did you regenerate the thumbnails?
Does the plugin let you choose what thumbnail size to use?
Are the image dimensions big enough that the thumbnail can be created?
September 15, 2016 at 2:55 am #193181webkompaan
ParticipantYes
No
YesI use this plugin often and never had an issue with it. I will take another look at its files.
September 16, 2016 at 7:44 am #193236webkompaan
ParticipantI got it solved, but I still don't understand. In the plugin php files the images was loaded using get the post thumbnail function. So the post thumbnail was used as featured image. But isn't that the same? I couldn't find in WP / Genesis / Digital Pro were to change the size and crop yes/no for the post thumbnails. So I changed it to 'featured' inside the plugins php file and that worked, because I added a custom image size with the name featured in my functions.php file.
September 16, 2016 at 9:34 am #193243Christoph
MemberWeird.
I would try changing the size for the thumbnail instead of changing the plugin files.
set_post_thumbnail_size( 150, 150, TRUE );
https://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
September 17, 2016 at 3:15 am #193280webkompaan
ParticipantOfcourse, thanks! I didn't think of that obvious solution.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.