Archived topic
2 questions regarding adding copyright below featured image
3 replies · Started by Fabien on March 27, 2023
Hi,
I've found the following gist that adds a caption on Featured Image.
Is this part really necessary ?
if($thumbnail_image[0]->post_excerpt)
$out .= '<div class="wp-caption thumb-caption">';
It adds a non-necessary div.
Also, what is the point of having .featured-image line-height: 0; ? It makes the caption overlapping the featured image.
Thanks
Is this part really necessary ?
It's easier to target the caption using CSS. But if you do not have the needs, you don't have to add them.
Also, what is the point of having .featured-image line-height: 0; ?
You can override it using CSS.
The reason for the 0 line-height is to avoid adding extra space to the image when there's no caption.
Hi @Ying,
Thanks for your reply.
1. Ok, I will remove this part.
2. Ok, make sense.
Have a good day,
Fabien
You are welcome, have a nice day too :)