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, 11 months ago by paddor82.
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).
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.
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!
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, 11 months ago by paddor82.