Tagged: caption on featured image
- This topic has 7 replies, 2 voices, and was last updated 2 years, 9 months ago by Theme Horse Support Team.
-
AuthorPosts
-
March 2, 2022 at 1:32 am #97436March 5, 2022 at 9:53 pm #97580Theme Horse Support TeamKeymaster
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
March 5, 2022 at 11:15 pm #97586tiburciorobertoParticipantHi
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 updatethis 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
March 5, 2022 at 11:18 pm #97587tiburciorobertoParticipantyes the quote changes when I paste it here but it is correct in the file
March 7, 2022 at 1:23 am #97608tiburciorobertoParticipantHi
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 updateMarch 8, 2022 at 7:32 pm #97689Theme Horse Support TeamKeymasterWe 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?March 10, 2022 at 11:28 pm #97777tiburciorobertoParticipantYou 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 youMarch 13, 2022 at 6:41 pm #97858Theme Horse Support TeamKeymasterYes, 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
-
AuthorPosts
- You must be logged in to reply to this topic.