Hi Ben,
There are two types cropped size for the portfolio items, one is entry and another one is entry-fullwidth and it depends on the layout you have chosen for your site. The size of these two is greater than the images you used in the portfolio items, and that is the reason why the images are not cropped. If you want to override it and use other image settings, you can insert the following code in your child theme’s functions.php file:
You can change the size into the following available image sizes:
thumbnail
medium
large
full
entry
entry-fullwidth
entry-cropped
entry-cropped-fullwidth
if ( ! function_exists( 'x_featured_image' ) ) :
function x_featured_image( $cropped = '' )
{
$stack = x_get_stack();
$fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false;
if ( has_post_thumbnail() )
{
if ( $cropped == 'cropped' )
{
if ( $fullwidth ) {
$thumb = get_the_post_thumbnail( NULL, 'entry-fullwidth', NULL );
} else {
$thumb = get_the_post_thumbnail( NULL, 'entry', NULL );
}
} else {
if ( $fullwidth ) {
$thumb = get_the_post_thumbnail( NULL, 'thumbnail', NULL ); //changed entry-fullwidth to thumbnail
} else {
$thumb = get_the_post_thumbnail( NULL, 'entry', NULL );
}
}
switch ( is_singular() )
{
case true:
printf( '<div class="entry-thumb">%s</div>', $thumb );
break;
case false:
printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>',
esc_url( get_permalink() ),
esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
$thumb
);
break;
}
}
}
endif;
Please remember that the above code will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.
Thanks