Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Not displaying Feature Images in Posts - Auto Focus 2.0.2 WordPress


Hi -

I'm using the AutoFocus 2.0.2 theme and need some help.

I want to be able to assign a feature image to a post so it appears on the homepage - BUT not on the post itself. For some reason, if I check the box to hide the image slider, the featured image ends up behind the headline instead of in line or someplace on its own, so I'd rather hide it all together. The attached image shows the problem.

I think the code that needs adjusting is in single.php (though I could be wrong - my php isn't great):

From: single.php

global $posts, $shortname;
// Grab The Blog Category
$af_blog_catid = of_get_option( $shortname . '_blog_cat');
$af_img_display = of_get_option($shortname . '_image_display');
$af_img_slider_count = get_post_meta($post->ID, 'slider_count_value', true);

// If this isn�t a blog post, show the AutoFocus Entry Image (See: functions.php)
if ( !in_category($af_blog_catid) )
af_single_entry_image($af_img_display, $af_img_slider_count); ?>

The site is here (bear in mind I may be playing with it):

and a "problem" post here:

Answers (6)


rizaljohn answers:

I can help you with this. Just send me the ftp details.

Jason DaPonte comments:

Can you please post on here so the community can vet your answer? No offense but I'm a little worried about handing out server access via this site :)


Jason DaPonte comments:

This guy got me the fix. Please vote for him as I have.


Luis Cordova answers:

no never send ftp details like that

rather try something

another guy had asked similar question it is just a matter of configuration but for your case, hmm

yeah they always bring up the similar question

Luis Cordova comments:

draw and point in an image the problem really don't get it

Jason DaPonte comments:

> yeah they always bring up the similar question

Uh oh.

Yeah, I've tried every configuration I can think of and its maddening. It's gotta be in the code (maybe).


Bogdan answers:

If you have direct access, you can solve better and faster the problem. Think before posting if you are worried about giving the user and password. Take it as and advice. Good luck.


Luis Abarca answers:

The code for display the images are outside of the content container DIV, maybe you can post your single.php code on to have a look and see whats wrong, or even better on and share the link to check it out


Abdessamad Idrissi answers:

If I understood your question correctly, i would say because Autofocus needs images with either 800px wide or 600px height, or it will mess with the layout:
<blockquote>Show a sliding Gallery of attached images above the post title? (Limited to 10 images. IMPORTANT: All images must be at least 800px wide or 600px tall.)</blockquote>

Or do you want to hide images on sticky/featured posts?

Jason DaPonte comments:

I know that part - the problem is that it needs a 188 x 188 image for the homepage (blog). If you associate no other image with the page, it automatically puts the 188x 188 into the post and in the wrong place.

Abdessamad Idrissi comments:

Sorry but I don't get what you are trying to achieve :(
Could you be more clearer? is the problem with posts or pages or the home page?.. or other categories?
More explanations will help us fix this issue faster :)

Abdessamad Idrissi comments:

I checked your website and I see no problem :) !


Duncan O'Neill answers:

Hi Jason,

I was going to suggest a css solutiion, but on re-loading the page, it seems you've solved the issue yourself by creating a link to the image instead ( inserted it into the post rather than used it as a feature image? The second generated no link ).

The css solution involved over-writing a position:absolute; css declaration on the featured image.

Anyway, what you've done seems to be working, except that you have a background color on the entry image container, from the embedded css;

#content .entry-image-container,
#content .entry-video-container,
#content .entry-gallery-container {background-color:#F0F0F0}

This will be generated in your autofocuspro settings, I'm guessing.

You could improve what you have by over-writing that rule in the linked css file,

Add this to the bottom of that file;

#content .post .entry-image-container { background-color:none;}

That /should/ over-write the background-color behind the logo by being more specific. Hope this helps.