WordPress.org

Ready to get started?Download WordPress

Forums

Front page thumbnail (4 posts)

  1. signal
    Member
    Posted 9 years ago #

    Is there a way to automatically add a thumbnail of the first image in a post (if there are any) to its front-page version?
    I think this topic: http://wordpress.org/support/topic/11767#post-70739 is asking about the same thing, but (being a newbie) I can't get his code to work.

  2. Lorelle
    Member
    Posted 9 years ago #

    Do you want a thumbnail on the post when only seen on the front page, or a thumbnail for every post and seen on every post?

    A simple way of having a photograph on the front page but not in your post is to use the EXCERPT box on the Write > Post screen. Put your photograph in there, and then change the index.php file where it says the_content() to the_excerpt() and you will get the explicit Excerpt that you did, which would be the photograph.

    That's the simplest way. There are also plugins and things that add photos to categories and things like that. Am I close to what you want?

    I do this on my site.

  3. signal
    Member
    Posted 9 years ago #

    I would like for the thumbnail to be seen on the front page for every post that has images in it.
    The excerpt box sounds like what I want, I wasn't aware that you could put images in it. This would have to be via code, right?
    I've installed the "Exhibit" plugin, which also seems to do what I want, and am trying to figure it out.
    Thanks for your help.

  4. Lorelle
    Member
    Posted 9 years ago #

    Why not? Just type in the html and you are good to go. I have it in mine.

    <img src="/images/ball.jpg" alt="picture of a red ball" />

    Oh, I also have CSS that helps the image look like "something" in the excerpt. Like this:

    .excerpt img {float:right; border:0; margin: 5px 0px 5px 10px}

Topic Closed

This topic has been closed to new replies.

About this Topic