Loofah
Member
Posted 4 months ago #
Similar to this thread - http://wordpress.org/support/topic/media-lib-does-not-show-attached-to-details-for-many-existing-posts
I create a new post, insert an image from the media library which shows in the posting OK. If I then browse by category, the title and summary are there, but no image thumbnail.
The image in question is in the media library and attached to another post, can you not use the same image twice??
Your theme may be using <?php the_excerpt();?> instead of <?php the_content();?> in its template files. Try editing the relevant template file(s) and replacing <?php the_excerpt();?> with <?php the_content();?>
Loofah
Member
Posted 4 months ago #
Hmm, I found one instance of <?php the_excerpt();?> and replaced as suggested, that was in archive.php. The result was that the category displayed the entire posting but still no thumbnail...
Any ideas on where other instances may be?
It definitely sounds like a theme issue but you'd need to go through all of the theme's files to find the source of the problem.
Loofah
Member
Posted 4 months ago #
Could this be the source? I found it in 'functions.php'
# Displays post image attachment (sizes: thumbnail, medium, full)
function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') {
if ($postid<1) $postid = get_the_ID();
if ($images = get_children(array(
'post_parent' => $postid,
'post_type' => 'attachment',
'numberposts' => 1,
'post_mime_type' => 'image',)))
foreach($images as $image) {
$attachment=wp_get_attachment_image_src($image->ID, $size);
?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php