Picture description below thumbnail

Posted in: Newspaper
Post count: 20

Hello,

because of copyright issues i am searching a solution to put the picture description below all thumbnail images or after the excrepts

Post count: 9544

You would likely need to manually edit *all* the module files you’re using for your home page and category layouts to do that. Might be a plugin for that, but I’ve never see one.

What we do here, is actually put the copyright notice at bottom of the graphics themselves to avoid that issue. However, we’re not “scraping” images from other sources.

  • This reply was modified 11 years by simchris.
Post count: 20

Thank you Christopher for your Answer!

Can you tell me where i find the right files to change?

Regards

Post count: 6600

Hi,

You need to edit the module files and add the line from below, like this: http://screencast.com/t/31I3BzhGzse
My example is for module 2 layout. If you use other module you need to edit it and add this line:
<?php echo get_post(get_post_thumbnail_id())->post_content; ?>

Thanks

Post count: 20

Hello and thank you for the code snippet,

I’ve added the code as above described an got following error:

Post count: 6600

Hi,

Please replace the line you have added to the module with this one:

post->ID))->post_content;?>

This should fix that: http://screencast.com/t/kY03OIYXW

Thanks

Post count: 20

So thank you,

it didn’t worked, so i made an own solution:

<?php
$featured_image_id = get_post(get_post_thumbnail_id($this->post->ID));
$featured_image_info = td_util::attachment_get_full_info($featured_image_id, 'art-big-1col');
if(!empty($featured_image_info['caption'])){
echo $featured_image_info['caption'];
}
?>

thanks

Post count: 6600

Hi,

It didn’t work because of the space between the greater sign and question mark from my code: http://screencast.com/t/nwhCpn9SKJMR
Anyway, glad you have managed on your own, feel free to use the one I gave you if you want, like this:

post->ID))->post_content;?>

I have tested it and works fine. Sorry about this!

Thanks for the message!

Post count: 3

Honestly, dispaying a copyright should not include coding.
It is so important and should be available easily.

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.