WordPress.org

Ready to get started?Download WordPress

Forums

Adding Thumbnails to WordPress Blog (9 posts)

  1. theseeder
    Member
    Posted 4 years ago #

    Hello, I am in the process of setting up my blog, however I cannot see how I can add thumbnails to my posts, I have added a custom field called "thumbnail" and pointed that to a 160 x 160 pixel image uploaded to wp-content, however it does not show up on my post, nor does it show up on my homepage.

    I am using the Twenty Ten 1.1 theme.

  2. futurepocket
    Member
    Posted 4 years ago #

    If you upload a image from the image uploader within WordPress, it will automatically allow you to resize the image to 150 x 150. Or if you import it first, and then go to modify it, you can edit the exact size of the image.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    if you wish to use a custom field for a thumbnail, you have to actually call the thumbnail somewhere in the code.....

    <?php echo get_post_meta($post->ID, 'thumbnail', true) ?>
  4. theseeder
    Member
    Posted 4 years ago #

    Hello futurepocket, I deleted the 160px x 160px image and uploaded a 150 x 150px image, however it still didn't show up, so I guess Rev. Voodoo suggestion is correct.

    I must admit I have been using wordpress for years, however have never set it up myself so I am a bit of a noob, where must I put that code?

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    well for my option, you put that code wherever you want the thumbnail in your template.

    However if you are editing the twentyten theme, thats a bad idea. Any changes you make to twentyten WILL be lost eventually. The theme gets replaced on every WP upgrade

    read up on child themes...
    http://codex.wordpress.org/Child_Themes

  6. theseeder
    Member
    Posted 4 years ago #

    Hello I will change the theme soon, my only question is which .php files are the ones I need to edit? There are quite a few index.php files and also the only single.php file there is is in the following directory \wordpress\wp-content\themes\twentyten\

    (obviously I know that the twentyten directory will be unused once I switch themes, however while I am playing with the design I can use the twentyten theme to check things out).

    Would I be right in presuming that the index.php file and the simple.php files that I need to edit are the ones in the twentyten directory?

  7. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    yes, you would edit the files of whatever theme is active
    index.php controls main blog view
    single.php is single post view

    but with twentyten, it uses get template part in index.php, and refers to loop.php

    So you would actually edit loop.php

    Also, when you change themes, they may already have thumbnail (featured image) functionality

    twentyten uses featured image to change the headers.... a lot of other themes use it to display a thumbnail

  8. theseeder
    Member
    Posted 4 years ago #

    Thanks, I really do appreciate your help, do you know of a theme which has thumbnails already set up?

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    Most of them honestly..... Just take a look through all the free themes on here.....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.