• I just installed the latest version of wordpress. I’m using the twenty eleven theme. I created a post, uploaded a featured image and clicked “use as featured image” at the bottom of the upload window. The image shows up in the “featured image” box in the wp dashboard. I published the post. No image shows up anywhere. Not on the home page, not on the single post page, not on category page. Am I doing something wrong? Is there some code that has to be inserted in functions.php in order for the featured image to work.

    I’ve watched tutorials and followed them exactly but I still can’t get the featured image to show.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Try using an image that is 1000px by 288px (the size of the default pic).

    I found when the size was to small it would not work, but with a large size image it replaced the default one.

    Thread Starter nastycanasta

    (@nastycanasta)

    hmmmm, a bigger image worked but I think I’m confused. Isn’t the featured image supposed to be part of the post and not the header image. Is the featured image a header image?

    That behavior is ridiculously stupid. The point of the ‘Featured Image’ is that it appears next to the post, usually auto-reduced to a thumbnail. This new behavior means that we have to re-size all of our images to 1000×288?

    Those dimensions only look good in the header banner. Furthermore, many of us purchase stock photos for our post thumbnails. The larger the stock photo, the higher the price. This means I have to buy a huge stock photo, just to display a Featured Image thumbnail?

    I’m sure someone has already figured out a solution. Hopefully they check this thread and help us all out.

    simply insert the image into your post.

    simply insert the image into your post.

    @fonglh – Then what’s the point of the Featured Image in the Twenty Eleven theme? The Featured Image area typically allows one to style it differently via CSS and have it appear at the side of the post, next to the post title.

    I could get around that by using CSS to generically style any .img that I insert into my post, but what happens when I insert multiple images? The Featured Image needs to be distinct.

    yes, so it shows up as the header image in the single post view. that’s quite distinct.

    you could create a child theme and modify the template files so the featured image displays by your title instead of as the header image.

    Ah, that explains why some of us are confused with what happens with the Featured Image. The Twenty Eleven theme has the option for turning the header banner off, so mine is off. With the banner off, you don’t realize where the Featured Image has gone.

    I made a child theme of Twenty Eleven. How exactly would I

    modify the template files so the featured image displays by your title instead of as the header image

    ? Thanks for any pointers.

    If you look at lines 88-92 of header.php, you’ll see the code where it checks for a featured image, checks the size and then gets the image.

    The actual function is get_the_post_thumbnail()
    https://codex.www.ads-software.com/Function_Reference/get_the_post_thumbnail

    I’m assuming content templates follow the same idea as the page templates, though I haven’t actually tried this out.

    Copy content-single.php over to your child theme folder, then insert the get_the_post_thumbnail() function where you want it. That’s probably between the <header> tags or before the entry-content div.

    Your single post pages should then have the featured image.

    Do the same with content.php and it should show up on all posts on your main blog page.

    I did manage to get 4 feature image to show up on my pages–they were all files form my iPhoto (not sure if that made the difference). I have downloaded a couple of images off one of those free royalty-free images website and can’t get these to show up, even though I went through the same procedure. Any help would be much appreciated!! Thanks in advance. I am very new to building websites so responses in English will be much more appreciated than those in html ??

    To disable future image to show in your header :

    <?php
    					// The header image
    					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( //promijenjeno da ne pokazuje futuered image u header is_singular() &&
    							//has_post_thumbnail( $post->ID ) &&
    						//	( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						//echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else : ?>

    comment line 88 if( // comment…
    line 89,90 92 ,93
    Hope it will help to somebody … header.php

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Is there a featured image bug in twenty eleven???’ is closed to new replies.