badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

caption on featured image stop showing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #97436
    tiburcioroberto
    Participant

    Hi Theme Horse Support Team,
    I have the following code in the line no. 34 of the file content.php to show caption on featured image but after i update to the version: 1.1.9 it does not work. I have Theme child.

    <figcaption class=”featured-image-caption”><?php echo get_the_post_thumbnail_caption(get_the_ID()); ?></figcaption>
    </figure><!– .post-featured-image .page-single-img-wrap –>

    #97580

    Hi tiburcioroberto,

    We found that the Double quotes (” “) used for the ‘class’ attribute are mistaken. please replace with the code provided below.

    class="featured-image-caption"

    Thanks

    #97586
    tiburcioroberto
    Participant

    Hi
    it’s not because of the quotes in the file it’s correct, It seems that I change the quote when I paste it on the page
    It was working fine before update

    this is the code in my child theme

    <figcaption class="featured-image-caption"><?php echo get_the_post_thumbnail_caption(get_the_ID()); ?></figcaption>
    </figure><!-- .post-featured-image .page-single-img-wrap -->

    I have this code in Appearance > Customize > Additional CSS

    .post-featured-image.page-single-img-wrap {
    	overflow: hidden;
    }
    .post-featured-image.page-single-img-wrap .featured-image-caption {
    	position: absolute;
    	left: 0;
    	right: 0;
    	bottom: 0;
    	padding: 50px 25px 5px;
    	color: #ffffff;
    	font-size: 14px;
    	font-family: arial;
    	background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5));
    }
    @media (max-width: 767px) {
    	.post-featured-image.page-single-img-wrap .featured-image-caption {
    		padding-left: 15px;
    		padding-right: 15px;
    	}

    But again it was working before the update

    #97587
    tiburcioroberto
    Participant

    yes the quote changes when I paste it here but it is correct in the file

    #97608
    tiburcioroberto
    Participant

    Hi
    I replaced the content.php file with the 1.1.7 version I had before the update and everything worked again.
    Apparently you guys made some change to that file that affected that part of the theme.
    But I will lose the changes they made in the new update

    #97689

    We have checked that the code is working very well on the latest version as well.
    could you please share with us your Site URL of the exact Featured Image Caption page so that we can check initially?

    #97777
    tiburcioroberto
    Participant

    You are right the code is working, I had a file content.php in the child theme folder that was where I was adding the code
    Thank you

    #97858

    Yes, the code should be added to the child theme otherwise your customized code will be lost when updating the Theme to a newer version in the Future.

    Thanks

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