Support » Fixing WordPress » Can't Get Thumbnails To Show (neither Admin nor Frontpage)

  • Justin Case

    (@the-buddha-garden)


    Hi everyone:

    I am trying to create thumbnail images for my wordpress site 3.3.1 and am not able to see in the admin anywhere to “assign” a thumbnail image for my posts. (I am using the the magasin uno reloaded theme.)

    I thought there would be an option to set an image as a thumbnail using the Set Featured Image.

    However, when I pick the image, only the Insert Into Post button appears. There is no button to set it as a thumbnail instead.

    I have added the following:

    if (function_exists(‘add_theme_support’)) {
    add_theme_support(‘post-thumbnails’);
    }

    to these two different files:

    /wp-content/themes/magasin-uno-reloaded/functions.php

    and this file:

    /wp-content/themes/magasin-uno-reloaded/includes/functions.php

    And neither one gives me the ability to add thumbnails in the admin.

    Am I missing something?

    ~~~~~~

    A related question:

    Does the add_theme_support function need to be DEFINED in a core wordpress file? I am not seeing this function defined in any of the wordpress files in my install.

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • JarretC

    (@jarretc)

    You can just upload it as the featured image and then use something like get_the_post_thumbnail in order to actually retrieve the thumbnail version

    http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    Justin Case

    (@the-buddha-garden)

    Hi there, JarretC:

    thanks for the response. Unfortunately, that doesn’t seem to work.

    My loop.php page already has:

    <?php
    if (has_post_thumbnail()) {
      $thumbid = get_post_thumbnail_id();
      $image_attr = wp_get_attachment_image_src($thumbid,$thumbnail_type,true);
      $imgpath = $image_attr[0];
    } else {
      $imgpath = $padd_image_def;
    }
    ?>

    and then later where it is supposed to display the thumbnail, it has this code:

    src="<?php echo $imgpath; ?>"

    Yet it still shows the default thumbnail image (the one that is defined with:

    else {
      $imgpath = $padd_image_def;
    }

    Any other suggestions?

    thanks in advance.

    JarretC

    (@jarretc)

    You can’t ‘define’ thumbnails as you were mentioning in your first post. The thumbnails are automatically generated from the featured image, there may be a plugin out there that does something similar to what you want but the default WordPress actions don’t work that way.

    Justin Case

    (@the-buddha-garden)

    Ok, I am fine if I can use the default thumbnail But I don’t understand why the default is not working.

    So what you are saying is to remove the:

    if (function_exists(‘add_theme_support’)) {
    add_theme_support(‘post-thumbnails’);
    }

    From the various functions.php file?

    And if I do that, shouldn’t this code work then by simply setting an image as a “featured Image”?

    ~~~~~~~~
    ?php
    if (has_post_thumbnail()) {
    $thumbid = get_post_thumbnail_id();
    $image_attr = wp_get_attachment_image_src($thumbid,$thumbnail_type,true);
    $imgpath = $image_attr[0];
    } else {
    $imgpath = $padd_image_def;
    }
    ?>

    ~~~~~~~~

    Is it possible it doesn’t work because no arguments are being sent in:

    $thumbid = get_post_thumbnail_id();

    It says in the codex that arguments are optional though, so I don’t know why it wouldn’t work if a post has

    Thanks in advance for any suggestions. I really need to get this working. I like the theme, but it isn’t supported so I would hate to have to give up on it now.

    Justin Case

    (@the-buddha-garden)

    Aha… I understand.

    I was trying to use an image that I was hotlinking to as the featured image. But you can’t do that for a thumbnail.

    I guess you have to use an image that you actually upload. If you instead give it the address of an image that already exists on the web somewhere, it won’t actually upload and crop the image.

    Oh well… it only took me all day to figure it out 🙂

    JarretC

    (@jarretc)

    hehe that does make a difference 😉

    You could use some custom code that would do something like that but not a native WP function 🙂

    Justin Case

    (@the-buddha-garden)

    Thanks Jarret:

    Really it is fine the default way. I just wish there had been some sort of popup or note or something saying that hotlinked images can’t be used for thumbnails.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can't Get Thumbnails To Show (neither Admin nor Frontpage)’ is closed to new replies.