• I’m usually a static blog kinda guy but I wanted something I could use as a place to store my Project 365 images, and WP seemed the easiest and quickest solution. I’ve installed it and configured the GK-Portfolio theme.

    The issue I’m having is that I need to use featured images so the home page works properly, which then means that my post pages have the image twice – once from the featured image and once fom the Image linked in the post.

    I have two solutions; either I don’t put the image in the actual post at all, or I stop the featured image appearing. At the moment I’m doing the former, but it feels a bit hacky. It also means the image isn’t clickable so you can’t get the full resolution image.

    So, I think the best solution is to stop the featured image showing I’m individual posts. Any idea how to do that with this theme?

    My usual tricks aren’t working.

    The site is at

    Cheers.

Viewing 1 replies (of 1 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Try changing content-header.php to this:

    <?php
    
    	/*
    		Template for the entry header
    	*/
    
    	$video_code = portfolio_video_code();
    
    ?>
    <header class="entry-header">
    	<?php if (has_post_thumbnail() && ! post_password_required()) : ?>
    		<?php if(!is_single()) : ?>
    			<?php the_post_thumbnail(); ?>
    		<?php endif; ?>
    	<?php elseif($video_code) : ?>
    		<div class="video-wrapper">
    			<?php echo $video_code; ?>
    		</div>
    	<?php endif; ?>
    
    	<h<?php echo is_single() ? '1' : '2'; ?> class="entry-title<?php if(is_sticky()) echo ' sticky'; ?>">
    		<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    	</h<?php echo is_single() ? '1' : '2'; ?>>
    </header><!-- .entry-header -->

    btw:
    consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or create a plugin with the code above.

Viewing 1 replies (of 1 total)
  • The topic ‘Stopping featured images appearing in posts’ is closed to new replies.