Tagged: x
-
AuthorPosts
-
December 12, 2016 at 5:55 am #1289818
Razorsharp_ParticipantHello,
I have managed to disable the featured image from appearing on my posts by hiding the featured image via css.
However, I would to have my featured images removed altogether, including in the html source code and not just hidden, from my posts but still have them appear on my blog pages.
I know this requires a change to a core file. But I can’t seem to figure out which one and to get it to work without also disabling the featured images on my blog/category pages.
Is this possible?
Any help is appreciated.
RegardsDecember 12, 2016 at 6:30 am #1289848
Paul RModeratorHi,
You can copy wp-content/themes/x/framework/views/{STACK}/content.php
to your child theme wp-content/themes/x-child/framework/views/{STACK}/content.phpThen remove this line of code.
<div class="entry-featured"> <?php x_featured_image(); ?> </div>Hope that helps.
December 12, 2016 at 5:37 pm #1290579
Razorsharp_ParticipantHey Paul,
This code works but it also removes the featured image thumbnails from my blog and category pages.
Is there any way to keep them but still remove the featured image from the posts page?
December 13, 2016 at 12:11 am #1290860
RupokMemberHi there,
Thanks for writing back. It will require a bit complex code and would be out of our support scope.
Thanks for understanding.
December 13, 2016 at 1:25 am #1290916
Razorsharp_ParticipantI managed to figure it out myself. It’s very simple to do by adding conditional tags…
<?php if ( is_category() && has_post_thumbnail() || is_front_page() && has_post_thumbnail() ) : ?> <div class="entry-featured"> <?php x_featured_image(); ?> </div>December 13, 2016 at 2:04 am #1290948
Paul RModeratorHi,
Glad you were able to figure it out.
Have a great day! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1289818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
