Posted: March 24, 2017 at 12:53 pm
I used this code: /* Calendar thumbnail full height*/ Example: https://www.masterpiecemixerssnellville.com/ Go to very bottom right. Message in a Bottle Rollover and look at bottom left…you will see like 2 small shells or pebbles. Now look at the calendar image. It still cuts off a part of the image. It happens on all images on desktop view. Phone view looks fine. |
|
Yep, she has tried it, I have tried it on several computers and browsers. I wish I can send you a screenshot. Try here: March 17th (Cannot see the word “Day” on calendar image. Rollover the image and you see it on the popup image) |
|
Hi Dorian, Maybe it’d be better if you used the Grid template add-on to display events. The Calendar doesn’t have as much control over those images. |
|
https://www.dropbox.com/s/vwj2o935jh977oo/Screenshot%202017-03-25%2010.57.47.png?dl=0 https://www.dropbox.com/s/tzntv88skv669qn/Screenshot%202017-03-25%2010.57.58.png?dl=0 ———- /* Calendar thumbnail full height*/ |
|
Can you verify this code is correct? I cannot find it using firebug:
|
|
Hi Dorian, The code in question will only affect views where it’s a small screen (where the max-width of the screen is 480px or less). Part of the problems you’re having with these images is they’re all of your event titles come out to different heights. Like how the St. Patrick’s day event fills 5 lines. One way to work around that is set a limit with some CSS. Here’s one example:
The above should probably be put into a media query so it only affects larger sized screens (not mobile). |
|
|
I tried this and did not work. March 24th only has 1 line of text and image still cutting off.
|
I tried this and did not work. March 24th only has 1 line of text and image still cutting off. |
|
Hi Dorian, There’s more than one issue that’s happening with the way your site has its featured images/thumbnails set up and the solution is going to involve more than adding some CSS. First, if you take a look at your competitor’s site, you’ll notice that they use two basic image sizes for their calendar thumbnails. There’s one basic size for portrait images and one for landscape images. Now compare one week on the masterpiecemixersgv.com site where each thumbnail has a wide variety of dimensions: So one thing that will help make your calendar’s thumbnails look nicer is you can set the WordPress Media settings to crop the images at a specific size, then you use the Regenerate thumbnails plugin to resize them. You can adjust the numbers to your taste, but a general rule of thumb is you set your image dimension settings to match the taller images. It looks like the tallest image on your current calendar by way of aspect ratio is the Pelican Sunset, so you could start with its ratio as starting point. Its dimensions are 150*206. You go to WP > Settings > Media, make a note of the settings there in case you want to change them back later, then set the 150 W and 206 H dimensions there and check the box next to “Crop thumbnail to exact dimensions (normally thumbnails are proportional)”. Then you save the changes Then you install the Regenerate Thumbnails plugin, then go to WP > Tools > Regen Thumbnails and click the button there. You’ll note that if you make another change to the Media settings thumbnail dimensions, you’ll need to regenerate again. You may need to make a few tweaks to the above, and may also need to make a few tweaks to some of the thumbnail images you’re using, so if you can clone a site to a dev server and test there first that will be the best way forward so you can experiment there. You also may want to use some CSS to add more padding between the events that occur in the same day, which is also something that your competitor is doing with their calendar. |
|
Thanks for your reply: I’ve tried various padding but cannot find the correct one. What is the best padding to do? Which class or ID |
|
The best padding will depend on the sizes of images you’re using. Have you narrowed down the different images to two main sizes? If so, may I ask what are the two main image sizes? |
|
I have them using 400×300 for horizontal and 400×600 vertical. So they are proportional. Do you have a better recommendation for the horizontal and vertical sizes? |
|
Do you see how the Pelican Sunset featured image is longer than its neighbors? https://www.evernote.com/l/AATSPWKzAsROo4KPgaAMXNNtjdIJ_8piDns |
|
I just checked and the pelican and the one to the left of it are both 300 px tall. |
|
They’re both 300px tall, but they have different widths, which affects the aspect ratio which also affects the way they’re cropped. So in the example of the screenshot, here’s the 3 images with their sizes: Pop Art Paris: 237px x 300px So what will happen is the calendar will resize the images so each day is the same width. Since Pelican Sunset is 18px narrower in width what ends up happening is the image stretched width-wise more than the other two images, then you see the hard crop of the bottom on the initial view. |
|
Gotcha. I will instruct them on cropping them they resize and see if that helps. Thanks |
|
We noticed in Firefox the get cut off still but in Chrome they show fine. Any thoughts? |
|
Also, they have some photos that have to be very tall beyond the standard size. But they need them to show full height. Is there a way to have a special css just for certain height photos for the calendar? |
|
No because the heights of the table cells are calculated with JavaScript. If you need a variety of image heights a better solution may to use the Event Grid add-on. |
|
Do you have any good examples of someone using grid view? And can you only enable it on mobile? |
|
Here’s the example from our demo site: http://demoee.org/use-cases/events-grid-template/ and a real world use example: The Grid template add-on works much like the calendar add-on where you add a shortcode to a WordPress post or page, and the shortcode gets parsed to display a grid of events. You use the WP Mobile Detect plugin to set specific content to only show on mobile: |
|
I notice in the real world example all of the photos are the same size. Will it adjust for various image heights? Can you have them in rows vs columns? Can you have them begin with the most current date so its not showing previous events. |
|
The grid will by default scale the images to fit.
They are actually displaying the events in rows.
That’s exactly what the two demos have. There are no previous events showing on those demos. |
|
I meant like on a phone, 1 per row |
|
Yes when you view those pages on a phone you’ll see the events are displayed one per row. |
|
The support post ‘RE: EE4 Calendar thumbnail Posted: March 6, 2017’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.