Home › Forums › Calendar Products › Events Calendar PRO › Image size in Event List / Event Single View
- This topic has 4 replies, 2 voices, and was last updated 9 years, 8 months ago by Brook.
-
AuthorPosts
-
August 26, 2014 at 5:07 am #700983ddbusterParticipant
The event list seems to pull the featured images that are specifically scaled to a certain width.
Barry had suggested to another user making the following change:
<?php echo tribe_event_featured_image( null, ‘medium’ ); ?>
But unfortunately, changing ‘medium’, makes absolutely no difference in my theme – tribesPlease advise
August 26, 2014 at 5:26 am #701032BrookParticipantHowdy ddbuster,
If none of the various WP attachment sizes like full, medium, small, etc. are working ten it seems likely your theme overrode it. You should be able to pass an array of values instead. For instance:
tribe_event_featured_image( null, array( 1920, //Width in pixels 1080 // Height in pixels ));
Did that work for ya? Please let me know. Cheers!
– Brook
August 29, 2014 at 3:14 pm #710017ddbusterParticipantafter setting $size to large, I wound up copying the underlying code where I needed it…
if ( is_null( $post_id ) )
$post_id = get_the_ID();
$link=true;
$image_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size );
$featured_image = ”;
//if link is not specifically excluded, then include
if ( !empty( $image_src ) && $link ) {
$featured_image .= ‘‘;
} elseif ( !empty( $image_src ) ) {
$featured_image .= ‘‘;
}
echo $featured_image;August 31, 2014 at 10:10 am #713823BrookParticipantAhh I am glad that worked. Thanks for sharing the solution. Let us know if you need help with anything else in the future.
Since this particular matter is resolved I am going to archive the topic. Cheers!
– Brook
August 31, 2014 at 10:11 am #713825BrookParticipantAhh I am glad that worked. Thanks for sharing the solution. Let us know if you need help with anything else in the future.
Since this particular matter is resolved I am going to archive the topic. Cheers!
– Brook
-
AuthorPosts
- The topic ‘Image size in Event List / Event Single View’ is closed to new replies.