Home › Forums › Calendar Products › Events Calendar PRO › Change Image height in Photo view
- This topic has 11 replies, 2 voices, and was last updated 8 years, 3 months ago by
allegrafalsecreek.
-
AuthorPosts
-
December 13, 2017 at 4:58 pm #1405078
allegrafalsecreek
ParticipantHow can I change the Image height in photo view to make it shows the entire image not cropped?
December 14, 2017 at 10:20 pm #1406173Geoff B.
MemberGood evening Michael and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
I would love to help you with this topic.As a first step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
The image height in the photo view will depend a lot on the theme you are using (and its CSS rules). In other words, it is a bit different on every site.
With that in mind, once I get a better look at your website, I will be able to offer better counsel on the changes to perform to achieve your goal.
Depending on the case, I will either recommend CSS or tweaking the photo view via a template override.
You might want to read our Themer’s guide to get a sense of how that works.
Hang in there!
Geoff B.
December 15, 2017 at 8:57 am #1406475allegrafalsecreek
ParticipantThis reply is private.
December 15, 2017 at 6:58 pm #1406961Geoff B.
MemberThis reply is private.
December 18, 2017 at 10:25 am #1408020allegrafalsecreek
ParticipantHi Geoff,
I’ve read the Themer’s Guide but it’s not very clear to me how to do that.
Could you please give me a detailed walk-through where and how to write the code for override?
Thank you!December 18, 2017 at 8:59 pm #1408452Geoff B.
MemberGood evening Michael,
Sure thing:
- Locate the file that is responsible for what you want to change.
In your case, you should look at the Photo view section under https://theeventscalendar.com/knowledgebase/themers-guide/#PRO
- Make a copy of that file (in your case /wp-content/plugins/events-calendar-pro/src/views/pro/photo/single-event.php)
- Open that file with a text editor and tweak it (in your case, find “medium” and replace it with “full”)
- Look at the comment section at the top of that file to know where to place your edited file. In your case that is [your-theme]/tribe-events/pro/photo/single-event.php
- Create the proper paths in your theme’s directory
- Upload your modified file there
Let me know how that goes.
Best regards,
Geoff B.December 19, 2017 at 12:45 pm #1409100allegrafalsecreek
ParticipantHi Geoff,
Thank you so much!
Now it is showing full image but it’s squeezed all in same height.
Is it possible to make the image container height flexible so it’s not distorted?
I want to make it exactly like the demo (https://wpshindig.com/events/photo/), shows full height image, not cropped, not distorted.December 20, 2017 at 9:46 am #1410018Geoff B.
MemberGood afternoon Michael,
I am glad you were able to make progress.
The squeezed image is actually caused by a CSS rule in your WordPress theme.
Try adding the following CSS rule to your style.css file or in your Custom CSS metabox:
.tribe-events-photo .tribe-events-event-image {
padding-bottom: 100% !important;
}Let me know how that goes.
Best regards,
Geoff B.December 20, 2017 at 2:32 pm #1410356allegrafalsecreek
ParticipantThank you Geoff,
After adding the css, it displays the full image for those with the same width and height but the image with shorter height is stretched and the image with taller height is still squeezed. All the images are in same height still.
Is there a way to keep the ratio and display the full image? So I don’t want them to be all same height, I want it to be flexible height depends on the image size.-
This reply was modified 8 years, 4 months ago by
allegrafalsecreek.
December 21, 2017 at 11:30 pm #1411437Geoff B.
MemberGood evening Michael,
The simple answer to your question is most probably.
As previously stated, what is going on is that your theme is throwing a few CSS rules in the way of achieving that goal.Could you please send me a copy of the latest version of your WordPress theme AND child theme via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.
Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates or customizations you might have made.I think this will be faster than our current approach provided how your theme is behaving.
Have a great day!
Geoff B.
January 12, 2018 at 8:36 am #1424804Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team - Locate the file that is responsible for what you want to change.
-
AuthorPosts
- The topic ‘Change Image height in Photo view’ is closed to new replies.
