Vladimir’s WordPress Forum


 
Current User: Guest
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

"Featured Image" in post not showing

Add a New Topic Reply to Post
UserPost

13:31
17 May, 2011


Vinay

Guest

Hi…. I think your plug-in is simply superb. The archives page never looked so good….

However, I am making my own personal site (www.thetandooriexpress.com) and I cannot get the archives page to show the image which has been set as "featured image" in the post. I tried to insert the image in the post, and that showed perfectly well in the archive page…. however, that means showing double the image in the post itself.

Please help….
Thanks heaps mate.

10:28
19 May, 2011


Vladimir

Admin

posts 707

I still need to find the time to display the featured image instead. If you patch the plugin feel free to send the patch to me

3:19
4 July, 2011


Nic

Guest

Great plugin!
Would like to know how can this be done as well. I use only featured image in all my posts. Thanks.

22:29
8 September, 2011


tim

Guest

same here: I only use the "featured image", so snazzy archives doesn't work for me.

22:39
8 September, 2011


tim

Guest

hey man here's the code you need, featured image appears to be called thumbnail, you use the_post_thumbnail()…

// Example
$my_page = get_posts("p=$page_id");
if( $my_page )
foreach( $my_page as $my_post ) : setup_postdata( $my_post );

the_title();
the_excerpt();
the_post_thumbnail(); // You can use this if you're using the built-in feature image facility

endforeach;
wp_reset_query();

23:38
25 September, 2011


Triumvir

Guest

Hi, I have the same issue, our site only contains featured images but I have no idea how to get it to display them. Please can you advise which part of the code needs to be amended. Thanks.

16:58
8 May, 2012


carcassRulez

Guest

in snazzy-archives.php

substitute:

preg_match('/<\s*img [^\>]*src\s*=\s*[\""\']?([^\""\'>]*)/i', $post->post_content, $matches);

$imageurl = $matches[1];
for:

$matches = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$imageurl = $matches[0];

and that should do the trick!!!Wink

19:36
10 May, 2012


Vladimir

Admin

posts 707

Thanks for the patch this is added to 1.7.0

3:14
11 May, 2012


carcassRulez

Guest

I noticed you missed an } before the penultimate endif; so the plugin doesn't activate, but then there must be something wrong within the loop?Confused

I've edited (and updated to 1.7) without a backup Laugh

3:22
11 May, 2012


carcassRulez

Guest

found the error in 1.7.0, you forgot a } in

if (!$imageurl)
(…)
$imageurl = $matches[1];}

now it's super, thanks Laugh

3:46
11 May, 2012


carcassRulez

Guest

also, high hopes for specialfx "3" CoolCoolCool

16:06
14 May, 2012


Heather

Guest

I have updated the plug-in and it's still not working.

Was the error fixed?

Thank you

Reply to Post

Reply to Topic:
"Featured Image" in post not showing

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 1