Showing First Photo in Post Excerpts

Community Forums Forums Design Tips and Tricks Showing First Photo in Post Excerpts

This topic is: not resolved

This topic contains 6 replies, has 4 voices, and was last updated by  obra18 1 month, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #79999

    carrieoke13
    Participant
    Post count: 27

    Hi, I’m using Minimum Pro for a blog that will heavily feature photos, and I’m wondering if there’s a way to format the home page a certain way.

    Currently I have it set up so the home page is the blog listing, which is excerpts and the featured image on the post. I really want the excerpt to just be the first image, with a few lines of the post under it.

    Is there a way to have the first image show up in the excerpt, EVEN if the image is NOT uploaded to WordPress and the featured image? (For example, if the first image is embedded with html from Flickr, or another site.)

    Thanks!

    http://fewandfarproject.com
    #80588

    braddalton
    Participant
    Post count: 10673

    Generally that’s the case with sites running HTML 5 as they display the first image as the featured image on content archives unless one is added manually.


    #81615

    carrieoke13
    Participant
    Post count: 27

    Hmm, Minimum Pro is an HTML5 theme and that doesn’t seem to be how it’s working. If I upload an image to the site and designate it featured image, it shows in the excerpt. But I’m wondering if I can get ANY first image to show in the excerpt; for example – if the first image I post in a post is from Flickr (using the HTML code from Flickr), is there a code snippet that can grab that image info and show it in the excerpt?

    #81661

    braddalton
    Participant
    Post count: 10673

    Not from Flickr because its not uploaded to your Media Library.

    You would need custom code for that.


    #92887

    tfmwa
    Participant
    Post count: 10

    This plugin + custom function might help:

    http://wordpress.org/support/topic/thumbnail-not-generated-from-flickr-post?replies=4

    Still trying to figure out how to change the default embed/wordpress template width for Flickr images posted to WordPress in this manner, but it works. Keep in mind it only works for new images posted in such a way, it won’t work retroactively.

    I think Studiopress can really set its dedicated photography themes apart from the competition even further by adding support for Post to WordPress functionality like this from Flickr and possibly other mainstream image platforms.

    #92892

    tfmwa
    Participant
    Post count: 10

    So scratch that. In the plugin settings you can click a button to generate a thumbnail for all your posts, so it will work retroactively.

    We’re using the Expose theme. To get the image to display ‘full width’ on the blog page (or in an archive template if you will) I needed to add:

    img.alignleft.post-image.entry-image {
    width: 760px;
    }
    

    Probably not the prettiest way to fix it, but it gets the job done. Basically, view the source code of the blog page and see what the featured image/thumbnail class is and change the width property with some custom css.

    You may or may not have to change your thumbnail settings under Dashboard > Settings > Media as well.

    Hope this helps someone in the future.

    #129746

    obra18
    Member
    Post count: 3

    hi..
    i am facing the similar problem… but in my case blogroll is showing random image, in some of the excerpt, from the post instead of showing first image..
    i have not set any featured image…

    • This reply was modified 1 month, 3 weeks ago by  obra18.
    • This reply was modified 1 month, 3 weeks ago by  obra18.
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.