Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Recent Posts Aspect Ratio
New Landing › How can we help? › Cardinal › Recent Posts Aspect Ratio
- This topic has 9 replies, 3 voices, and was last updated 9 years by David Martin – Support.
-
Posted in: Cardinal
-
October 12, 2015 at 4:15 am #219915
I would like to change the SPB Element “Recent Posts – Standard” to use a different aspect ratio for thumbnails.
Currently, the thumbnails are automatically sized to 4×3. I would like to swap that so that the thumbnails are 3×4 (3 wide by 4 high).
OR, have the ability to change the image size used here to any aspect ratio I need. For example: I would use a “Recent Posts” SPB Element in a Row that displays thumbnails at 3×4 and then another row with a 2nd “Recent Posts” SPB Element that uses 1×1 thumbnails.
There is a similar question here for the Atelier theme that was solved via email by Kyle: http://www.swiftideas.com/forums/topic/question-re-recent-posts-standard-row-thumbs/
Any help here would be greatly appreciated.
October 13, 2015 at 10:31 am #220366Hi,
Without modifying this core theme functions, would CSS suffice for you?
figure.animated-overlay.overlay-style.thumb-media-image { max-width: 75%; }
Else, you would need to add this function
sf_post_thumbnail
override to your child themefunctions.php
and change the image sizes: http://pastie.org/private/gvsclg1w2c3mmypcnly8qa.Thanks,
David.October 14, 2015 at 7:41 pm #220894The CSS suggestion had no effect unfortunately. .thumb-media-image references the blog page thumbnails and not the thumbs used in the “Recent Posts” SPB Element.
I’ve also added the code you linked to functions.php and the result changed the thumbnails shown on my blog page depending on the image sizes I changed… But this too has no effect on the “Recent Posts SPB Element.”
I fear your advice may be for changing thumbnails on the blog page only and not the actual Swift Page builder element. For reference, I’ll be including a “Recent Posts” SPB element on a new page and would like the thumbs to be displayed at 3×4 as opposed to the standard 4×3.
There is a similar question here for the Atelier theme that was solved via email by Kyle: http://www.swiftideas.com/forums/topic/question-re-recent-posts-standard-row-thumbs/
October 15, 2015 at 5:36 pm #221081Hi,
You should try the php code change that David advised by copying the pastie code to the functions.php of your child theme.
Than just change the sizes to the desired ones.-Rui
October 15, 2015 at 5:39 pm #221082Please read my reply. I have already done that and explained that it has no effect on the “Recent Posts” page builder element.
I was very thorough in testing both options given to me, I explained that they appear to ONLY change the BLOG page thumbnails and have no effect on the “Recent Posts” page builder asset that I want to use on a completely separate page.
October 15, 2015 at 5:50 pm #221090Apologize I missed that.
Can you provide us the link to your recent posts page?
Guess the credentials you provided will work. Need to check if it’s just a question of regenerating the thumbnails with the new settings.
-Rui
October 15, 2015 at 7:39 pm #221120This reply has been marked as private.October 19, 2015 at 10:22 am #221478Hi,
The function would be slightly different, it is called
sf_get_recent_post_item
and would need to be overwritten.Here is the whole function: http://pastie.org/private/on01abebg6rkw6rtnsq.
You can then change the width/height on using this two line:
$thumb_width = apply_filters('sf_recent_post_item_thumb_width', 360); $thumb_height = apply_filters('sf_recent_post_item_thumb_height', 270);
Thanks,
David.October 20, 2015 at 8:11 pm #222031That’s It! Thank you very much David. This is exactly what I was searching for… works perfectly.
October 21, 2015 at 12:50 pm #222184Great, glad to help you.
-David. -
Posted in: Cardinal
You must be logged in to reply to this topic.