• Resolved jake123f

    (@jake123f)


    Hello,
    How can I reduce the size of featured image that displays on a single event page?
    I have tried what is posted on this Forum, listed below, without success.
    1) I copied /wp-content/plugins/the-events-calendar/src/views/list/single-event.php to /my-theme/tribe-events/list/single-event.php
    2) I edited /my-theme/tribe-events/list/single-event.php, as follow:
    edited the code “tribe_event_featured_image(‘medium’)” to “tribe_event_featured_image(‘200x200px’)”
    Nothing happened after these.
    Please help!

    • This topic was modified 6 years, 5 months ago by jake123f.
    • This topic was modified 6 years, 5 months ago by jake123f.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi, you might want to copy /wp-content/plugins/the-events-calendar/src/views/single-event.php instead (means not the file of same name in the “list” sub folder!).

    Just tried that and it seems working for me.

    • This reply was modified 6 years, 4 months ago by paddor82.
    Thread Starter jake123f

    (@jake123f)

    What is the destination folder? I tried with /my-theme/tribe-events/list/single-event.php and it did not work.

    Just remove the /list/ folder from your destination path. And as said above, take the same file from the original location without “list” in the path (there are two files with the same name, one is in the list sub folder, one not (that’s the one you want to copy).

    Thread Starter jake123f

    (@jake123f)

    Well, I follow your instructions and edited the codes on line 58 to this: <?php echo tribe_event_featured_image( $event_id, ‘200x200px’, false ); ?>
    But, it’s not adjusting the picture size. It kept displaying the feature image with it’s default size, single event page.

    Thread Starter jake123f

    (@jake123f)

    *followed

    Oh, I have actually written “large” instead of the pixels. I do not know which adjectives are supported. Hopefully the theme developer could add some hints here. I see that “medium” produces a very small image, unfortunately. But “large” seems a bit smaller than the original one.

    <?php echo tribe_event_featured_image( $event_id, 'large', false ); ?>

    If it doesn’t work: Can you past the full path and name of the source file and the destination (to where you have copied and edited it)?
    Are you using a child theme? I do so and hence have copied the file into the child theme -> [myTheme-child]/tribe-events/single-event.php

    If you don’t use a child theme, it should be [myTheme]/tribe-events/single-event.php

    Plugin Support Jaime

    (@jaimemarchwinski)

    @jake123f let us know how that goes!

    @paddor82 thanks for your input!

    Thread Starter jake123f

    (@jake123f)

    Yes it worked if I don’t use pixels, thanks a lot.
    Can I use the other single-event.php (/wp-content/plugins/the-events-calendar/src/views/list/single-event.php) and use ‘medium’ or ‘large’ instead of pixels (such as 200x200px)? The single-event.php in the list’s directory looks better to me.
    Thanks again.

    That’s the template used for the entries in the calendar list view, not for the actual event’s page. I tested changing the size of the image in the list view using /wp-content/plugins/the-events-calendar/src/views/list/single-event.php, but in order to actually display a different image size in the list, you would need to additionally modify (overwrite) the CSS class

    .tribe-events-list .tribe-events-loop .tribe-events-event-image

    By the way: I believe these are the adjectives for the size (WordPress standard, source is the WP documentation):
    (‘thumbnail’); // Thumbnail (default 150px x 150px max)
    (‘medium’); // Medium resolution (default 300px x 300px max)
    (‘medium_large’); // Medium Large resolution (default 768px x 0px max)
    (‘large’); // Large resolution (default 1024px x 1024px max)
    (‘full’); // Original image resolution (unmodified)

    • This reply was modified 6 years, 4 months ago by paddor82.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to reduce the size of the single event featured image size’ is closed to new replies.