Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1289818
    Razorsharp_
    Participant

    Hello,

    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.
    Regards

    #1289848
    Paul R
    Moderator

    Hi,

    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.php

    Then remove this line of code.

    
    <div class="entry-featured">
        <?php x_featured_image(); ?>
      </div>
    

    Hope that helps.

    #1290579
    Razorsharp_
    Participant

    Hey 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?

    #1290860
    Rupok
    Member

    Hi there,

    Thanks for writing back. It will require a bit complex code and would be out of our support scope.

    Thanks for understanding.

    #1290916
    Razorsharp_
    Participant

    I 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>
    #1290948
    Paul R
    Moderator

    Hi,

    Glad you were able to figure it out.

    Have a great day! 🙂

  • <script> jQuery(function($){ $("#no-reply-1289818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>