Site logo

[Resolved] 2 questions regarding adding copyright below featured image

Home Forums Support [Resolved] 2 questions regarding adding copyright below featured image

Home Forums Support 2 questions regarding adding copyright below featured image

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2584377
    Fabien

    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

    #2584523
    Ying
    Staff
    Customer Support

    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.

    #2584630
    Fabien

    Hi @Ying,

    Thanks for your reply.

    1. Ok, I will remove this part.

    2. Ok, make sense.

    Have a good day,

    Fabien

    #2584767
    Ying
    Staff
    Customer Support

    You are welcome, have a nice day too 🙂

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