Support » Fixing WordPress » Featured image is "semi-dead"

  • Resolved LinusPWR

    (@linuspwr)


    I’m using a theme I’ve built on my own, where the featured image now has stopped working for some reason.

    I can click the link, the media gallery pops up, i select an image and clicks “add”, but it does not show up in the box. Neither is it added to the post.
    Maybe I should mention that there seems to be a blank/broken image or something in the gallery, the first “image” is a gray box not containing any image. When i click this image, the attachment details section to the right is completely blank.

    The gallery does how ever work perfect when i select “add media”, here the gray image is gone and i can attach images without any trouble.

    Any suggestions about what’s wrong here?

Viewing 5 replies - 1 through 5 (of 5 total)
  • What theme are you using? Where did you download it from?

    Thread Starter LinusPWR

    (@linuspwr)

    Hey esmi and thanks for reply.

    As i said, it’s completely written by myself.
    functions.php conatines this line;
    <?php add_theme_support( 'post-thumbnails' ); ?>

    and that’s all i’ve done with this. well, i do ask for a featured image later in the theme, but that should not have any thing to do with assigning an image?

    i’ve tried to rename the plugins-folder to see if there’s a plugin causing this error, but no luck there.

    Is that the only line in your functions.php file?

    Thread Starter LinusPWR

    (@linuspwr)

    No. 🙂
    But the only line that has something to do with media.

    The theme works on my local machine, but on the “live” (not live yet) site i get this error. Therefor i’m starting to think there’s a DB-error on the other site we’re building up somewhere?

    However, there’s one difference between the sites. On the “live” site it’s WP 3.7 while i’m running 3.7.1 on my local machine. But this should not affect this? When i started to work on this project i used 3.7 on my localhost as well.

    Thread Starter LinusPWR

    (@linuspwr)

    Well, seems like i lied.

    I forgot about a little special thing to the theme… It has a view for handling some images for the custom startpage.
    This was called outside the function that displays the form handling the image upload:

    if ( ! did_action( 'wp_enqueue_media' ) )
            wp_enqueue_media();

    That is, this was always called. I moved these lines inside this function and now it works.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured image is "semi-dead"’ is closed to new replies.