Image size in Event List / Event Single View

Home Forums Calendar Products Events Calendar PRO Image size in Event List / Event Single View

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #700983
    ddbuster
    Participant

    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 – tribes

    Please advise

    #701032
    Brook
    Participant

    Howdy 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

    #710017
    ddbuster
    Participant

    after 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;

    #713823
    Brook
    Participant

    Ahh 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

    #713825
    Brook
    Participant

    Ahh 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Image size in Event List / Event Single View’ is closed to new replies.