Reply To: Problems with Featured Images

Home Forums WordPress Themes – Premium Encounters Problems with Featured Images Reply To: Problems with Featured Images

#22367
Sushil Adhikari
Moderator

Hi Lindsey Carmichael,

As per our understanding you are supposed to display small featured image ,on home page.
Here we are providing you a two methods to solve your issue, it’s will depend on you , which one you feel comfortable to follow:

Case1: Please add this following css on child theme style.css file:

.home img.alignleft {
	max-width: 50%;
	max-height: 50%;
}

Note: You can change max-width and max-height value as per your requirement.

case2:
If you are technically sound on WordPress programming then only follow this steps.
Bring content.php templates from parent [site folder-> wp-content->themes->encounters->content.php] and paste it inside child theme[site folder-> wp-content->themes->encounters-child->content.php].
In content.php you will find this code,

 'alignnone'));
				break;
				case "small" : 
					the_post_thumbnail('', array('class' => 'alignleft'));
				break;
			} 
		endif; ?>

Replace this code with this following code :


 'alignnone'));
				break;
				case "small" : 
					the_post_thumbnail('medium', array('class' => 'alignleft'));
				break;
			} 
		endif; ?>

To know more on post thumbnail: please see https://developer.wordpress.org/reference/functions/the_post_thumbnail/

Note: Please use child theme to add this css, otherwise your changes will be lost on theme update.
Please let us know if we are understanding you fully or if perhaps this is not what you meant.

We look forward to your response