• Resolved mbreese1

    (@mbreese1)


    Hi all ??

    The featured image in archive and recent post looks great but totally stupid on individual posts. Right now I’m using the following to remove it, but that’s going to get ridiculous as I write more posts:

    #post-71 .alignleft.scale-with-grid.wp-post-image {
    display: none !important;
    }

    I found this solution but single.php doesn’t have that code in it.

    Can someone help? I’m feeling pretty ridiculous right about now ??
    https://strutcreativestudios.com/

Viewing 1 replies (of 1 total)
  • Theme Author simplethemes

    (@simplethemes)

    Try this in your child theme functions.php:

    function skeleton_thumbnailer($content) {
    		global $post;
    		global $id;
    		$size = 'squared150';
    		$align = 'alignleft scale-with-grid';
    		$image = get_the_post_thumbnail($id, $size, array('class' => $align));
    		if (!is_single()) {
    			$content =  $image . $content;
    		}
    		return $content;
    	}
    	add_filter('the_content','skeleton_thumbnailer');

    This is copied from the parent theme’s functions.php file. I just enclosed the output in the !is_single() conditional.

Viewing 1 replies (of 1 total)
  • The topic ‘Need to remove featured image from individual post pages’ is closed to new replies.