Featured Image – Show Caption

Posted in: Newspaper
Post count: 12

Hey,
thanks for this great Theme. I’d like to show the Image Caption of the Featured Image under the picture.
Can you help me how to do this?

I use the Post Template Style 8 and i’d like to show it on the right side – over the sidebar.

Thanks!

Post count: 7909

Hi,

The featured image used on post template 8 is streched using javascript code and it wont display the caption.
You need some customization to have also the caption, so please edit single_template_8.php file and add this code – http://screencast.com/t/gDleyLTVphttp://pastebin.com/hYQyNHVG
The caption should appear now on you post page, but you need to customize it. I provide also a css to be more visible, but you can change it like you wish – http://screencast.com/t/4JimeNqF0U

.td-feat-image-caption {
color: #ffffff;
margin-top: 10px;
margin-left: -5px;
padding: 10px;
background-color: rgba(34, 34, 34, 0.55);
}

Thanks!

Post count: 12

Thanks a lot. Works & looks great

Post count: 15

Is there a way to be able to do this on newer version of Newsmag theme? We also need captions displayed on featured photos in post layout 8 but immediately below each photo.

Thanks!
Ray

  • This reply was modified 8 years by Solari.
Post count: 20685

Hi,

The same solution should work for Newsmag post template 8. Paste the provided code in the single_template_8.php file after the featured image code
https://www.screencast.com/t/cn7UcaEY6cF6
Then apply this CSS code for some styling, you may change it however you like
https://www.screencast.com/t/A4c7PFSS7

.td-feat-image-caption {
color: #ffffff;
padding: 10px;
background-color: rgba(34, 34, 34, 0.55);
}

Thanks

Post count: 15

Great! Is there a way to make the background more transparent in black?

Thanks,
Ray

  • This reply was modified 8 years by Solari.
Post count: 20685

Hi,

You can use any color you want in the code, that is just an example. Create your color in the same rgba format or use any color format you want. If you want to keep the current color format, try this color generator
https://www.hexcolortool.com/
Replace the color example according to your needs.

Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.