Article image which can be resized (5 posts)

  1. Dave Redfern
    Posted 7 years ago #

    Hello all,

    I am looking to implement a news section to a site. I know how to do all the obvious things (text, titles etc) from the downloadable templates.

    The bit i am stuck on is having the ability to upload an image which can then be resized to two different sizes -
    - a thumbnail for the homepage
    - a larger image for the single post pages

    I know I can just drop this at the top of the article but for the client this could become confusing and messy. Is there any other easy way of doing this?

    Many thanks in advance


  2. krembo99
    Posted 7 years ago #

    If I understand correctly what you want ,It is done automaticly by WP in the 2.5+ versions ..
    If not , you have some plugins that do that for the older versions..

  3. Dave Redfern
    Posted 7 years ago #

    Hello and thanks for replying.

    I am using 2.65 so that should work. Do I just place the image in the main write section and pull it from there?

    I tried to google something but couldn't find much.

    What I am have is this - [url removed per op's request]

    If you see the lastest news, at the moment I have hard coded that image in but I want that to be small (thumbnail size) on the homepage and when you click through ([url removed per op's request]) it to appear large on the right hand side (full image size).

    Is this easy to do?

  4. Milo
    Posted 7 years ago #

    Via using custom fields, something like this:

    <?php $image = get_post_meta($post->ID, 'lead_image', true); ?>

    <img alt="<?php the_title_attribute(); ?>" src="<?php echo $image ?>" />

    within your loop.

  5. Michael Fields
    Posted 7 years ago #

    Check out the 6th post down in this thread:

    I think this is what you are looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic