Ok so I’ve found this add_image_size function that might work here http://www.studiograsshopper.ch/web-development/wordpress-featured-images-add_image_size-resizing-and-cropping-demo/
Still trying to wade through how this would work and be applied.
you could use css;
example:
img.thumbnail{width:560px;height:auto;margin: auto 0!important;}
this will obviously stretch smaller images;
or use:
img.thumbnail{max-width:560px;height:auto;margin: auto 0!important;}
and possibly give the image a more unique css class
Thanks for the info.
I’ll try to figure this out. I don’t find the WordPress Codex as being all that easy to follow and understand. But again i’m not very well versed in most of this stuff.
Why not just use <?php the_post_thumbnail('full');?>?
Alchymyth,
yeah I tried that, and it works. However as I’m handing this site off to the client i want to make sure they’re not stretching their images.
Esmi,
I’ll give it a shot. Reason for not using it? Because I’ve never heard of it. Let’s see what happens.
It is fully documented on the page I linked to above 🙂
Yeah I’m going through it now. the problem I have with the “full documentation” is I’m not well versed in PHP to begin with so I end up pasting in code incorrectly. All the information i’m sure is there, but I’m not sure how to interpret it. I’m given the correct snippet but not the right place to put it. I’ve thrown quite a few errors, crashing the site in the process, because I placed something wrong in the functions.php file. I’ll be given a bit of code to place there, which is great, but i don’t know where to place it.
You say that your home (main posts) page is currently display an excerpt, yes? If so, it will probably be using <?php the_excerpt();?>. If so, all you need to do is add <?php the_post_thumbnail('full');?> either immediately above or below <?php the_excerpt();?>.
Esmi,
Ok. I was thinking that was correct. I did it like this
<div class="entry-content">
<?php the_post_thumbnail('full');?>
<?php the_excerpt(); ?>
<p><a class="readmore" href="<?php echo get_permalink(); ?>"> Read More...</a></p>
</div>
I saw that I need to add this <?php add_theme_support( $feature ); ?> to my functions.php file as well right? I have added it now….don’t have any errors this time so it should be good to go…I hope 🙂 Not getting any images showing yet. But that might be an issue with the sample image i currently have on the site.
Sorry – I assumed your theme already has support for featured images via add_theme_support(). Remember that you will need to specify the featured image for each post on the Add New/Edit Post page.
Good to know. I’ll give this all a try. Thanks so much for the help
Looks like it’s working! … mostly. I’m using <?php the_post_thumbnail('large');?> But I’m doing something wrong. I set the feature image as large (which i adjusted in Media to be 570 x 300, the height could be arbitrary, i’m not partial to it ) But after all that the image is sizing to 400×300. Not sure where that is being called and how to change it.
jalacom
It maybee gets the picture of 400×300 pixles because it did crop and set the sizes at the moment you uploaded it to WordPress. If you changed the “large” thumbnail sizes under “Media” recently you have to remove and reupload your picture again to make WordPress crop and/or resize your pictures to the new sizes you set under Media. It should then pull the correct size if you call for ‘large’.
This might be the problem in your case?