Tagged: x
-
AuthorPosts
-
October 20, 2016 at 7:23 pm #1224612
rekluseParticipantHello, I have what I hope is a fairly simple question.
I created a class to hide the Featured Image on specific posts, since I sometimes want to replace the image with a video player.
Here is the code I am using in the customizer:
/* NEW CLASS FOR HIDING FEATURED IMAGE IN POSTS */ .hideFeaturedImage .entry-featured { display: none; }Problem is, when I use this code it also hides any other featured images that might be on the page. Specifically, it is hiding the [product id=”xxx”] WooCommerce shortcode, which is pulling in the featured image from specific products.
Is there some way I can modify the code I am using so it only hides the POST featured image, without hiding other featured images the page might be drawing from?
I’ve attached two screenshots — one with the class enabled and one with the class disabled — in case it helps.
Thanks!
October 20, 2016 at 11:57 pm #1224965
FriechModeratorHi There,
Thanks for writing in! Please update your code to this:
.single-post .entry-featured { display: none; }Hope it helps, Cheers!
October 21, 2016 at 1:22 pm #1225730
rekluseParticipantThank you. I tried a variation of this (your code didn’t include the custom class I am trying to create, since I don’t want to hide featured images across the entire site) and it didn’t work. I am guessing I got this wrong:
.hideFeaturedImage .single-post .entry-featured { display: none; }Unfortunately the featured image is displaying even when I am using the hideFeaturedImage class on the page. Any suggestions?
Again, just to be clear: I only want to be able to use a class to hide the single post featured image on select pages, without affecting the other featured images that might be on the page (such as the WooCommerce product shortcode I had mentioned.)
Thanks guys!
October 21, 2016 at 5:17 pm #1225970
JadeModeratorHi there,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1224612 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
