WordPress.org

Forums

[resolved] [Theme: Bloggy] Remove thumbnail from Home page & top of post (3 posts)

  1. LifeWithMunchers
    Member
    Posted 1 year ago #

    I only want thumbnails for be displayed on my category pages (like this), but I can't seem to do this without it also showing on the home page or at the top of the post itself.

    I have tried to remove the_post_thumbnail from my themes content.php file, but this removes it from all 3 locations. I have also done the same in single.php, which has no effect at all.

    Any help would be appreciated.

  2. LifeWithMunchers
    Member
    Posted 1 year ago #

    UPDATE:
    Almost there. I replaced the following in content.php:

    <div class="entry-details">
    <?php if ( has_post_thumbnail() ): ?>
    ">
    <?php the_post_thumbnail('thumbnail'); ?>

    <?php endif; ?>
    </div>

    With

    <div class="entry-details">
    <?php
    if(!is_single()){
    if ( has_post_thumbnail()) { the_post_thumbnail('thumbnail');}
    }
    ?>
    </div>

    What do I need to add to remove it from the home page aswell?

  3. LifeWithMunchers
    Member
    Posted 1 year ago #

    FIGURED IT OUT

    <div class="entry-details">
    <?php
    if( is_category()){
    if ( has_post_thumbnail()) { the_post_thumbnail('thumbnail');}
    }
    ?>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic