WordPress.org

Ready to get started?Download WordPress

Forums

Two separate images per post? (9 posts)

  1. rbarrero
    Member
    Posted 8 years ago #

    Hi there;

    Wondering if anyone has a plugin or hack for having 2 separate images per post, depending on your view.

    I'd like to have a small thumbnail image for the "teaser" (front page), but I want to have a larger image when you click through to view the entire article.

    Has anyone seen anything like this?

    Thanks!

  2. nmallory
    Member
    Posted 8 years ago #

    I wrote my css so that if the image is on the index page it's 50% of the height and width. Seemed easier than a plugin.

  3. rbarrero
    Member
    Posted 8 years ago #

    Seems like an interesting idea... I'd like to try it - would you mind sharing the CSS? or a link?

  4. nmallory
    Member
    Posted 8 years ago #

    I predefined what size would be a good fit for my blog based on the entry width.

    Mind you this does require me to manually set a class with each image as I upload it to determine if it's horizontal or vertical. Otherwise it's fine.

    .postimgh {
    width:456px;
    height:304px;
    margin-left:-5px;
    }

    .entry .postimgh {
    width:228px;
    height:152px;
    }

    .postimgv {
    height:456px;
    width:304px;
    margin: 5px;
    }

    .entry .postimgv {
    height:228px;
    width:152px;
    }

  5. rbarrero
    Member
    Posted 8 years ago #

    Makes sense, I see what you're saying. One more question: If you're defining a class in your post for the size of the image, how is it being changed once you're reading the entire article instead of just viewing the home page 'teaser'?

  6. rbarrero
    Member
    Posted 8 years ago #

    Do you have an example post anywhere?

  7. nmallory
    Member
    Posted 8 years ago #

    I'm not using links in this post but you could, but if you scroll down my index page to "the orange man" post, there are three pictures which are smaller on the index page and then larger on the post page when you open the permalink. All you'd have to do is link the images with the permalink.

    Yes, I know it's manual coding, but it's better than waiting on a plugin.

  8. nmallory
    Member
    Posted 8 years ago #

    The index page has .entry class divs around each teaser post but the post pages don't have that class on them. Therefore, on the post page, the default css is used.

  9. VaamYob
    Member
    Posted 8 years ago #

    I'd recommend using my hide/show plugin. With it, you can show a thumbnail in list mode, but show the full image/video in full read mode.

    http://rane.hasitsown.com/blog/page/2/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags