• Resolved jalacom

    (@jalacom)


    Hi,
    Hopefully someone is able to help me with this. I’m finding my ignorance knows no bounds.
    This is my site: gtsb
    I have my site set up with the homepage displaying excerpts of the most recent posts. I would like an image to show up with that excerpt (if there is one present in the post). I would also like that image to be full width. I have a screen shot here: https://www.filedropper.com/screenshot2012-04-03at125629pm that I uploaded to filedropper. I am currently using a function called Catch That Image that I found at wprecipes.com. It sort of does what I want. But I’m unsure how to control the image so I can make the width fill the full space. Not sure if this is the best method and if I can adjust it to do what I want. This avoids using custom fields (however i’d use that method as well if i knew how to). I’ve heard a lot about using custom fields and a few other methods, but have not been able to figure them out either.
    If someone can lead me in the right direction i would appreciate it

Viewing 3 replies - 16 through 18 (of 18 total)
  • You can also make the image clickable and link it to the article.

    Here is an example how to use an a-link with the the_post_thumbnail command:

    <?php if ( has_post_thumbnail()) : ?>
       <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
       <?php the_post_thumbnail(); ?>
       </a>
     <?php endif; ?>
    Thread Starter jalacom

    (@jalacom)

    Ok fixed it using the codex link from above and referencing the Post Thumbnail Linking to Large Image Size section.

    Thread Starter jalacom

    (@jalacom)

    Yurini,
    Great thanks. That’s actually ideal to have it link to the article.

    I think the image needing to be reuploaded was the issue as you mentioned.

    Is there a way to set just the width of a given size so the image will always be 560px wide? I’m not as concerned about the height. The problem I have is that currently I have the height set to 300px with the width at 560px, the resized image (since it’s not cropping) resizes to either 300px tall or 560px wide, which ever it hits first while resizing proportionally. One solution would be to just upload the correct dimension, however I’d like to make it a little more fool proof with less work for my client.

    Thanks so much for your input. The a img link to the article is great.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Include large full width image with the_excerpt()’ is closed to new replies.