This topic has 2 replies, 2 voices, and was last updated 8 years by wbishop.

  • Author
  • #90802
     wbishop
    Participant

    Hi-

    (Have searched the support forums but have not found an answer to this…?)

    We have Kleo displaying related posts at the bottom of any post. There are three displayed in a carousel. The featured image of each is displayed and appears rectangular (200×113 @ screen of 1024×768, for instance.)

    We would like the images to be square instead.

    Where/how can we change this aspect ratio?

    Have pored over Slider Revolution, YARPP,, settings, etc. with no luck. Your guidance would be much appreciated!

     

    #90816
     sharmstr
    Moderator

    Kleo sets the carousel images to 480×270, then the css sets the max-width to 100% and the height to auto. This will resize the width based on how many items are being displayed (1, 2 or 3). You can override that with the following function placed in your child theme’s functions.php file which will make them square.

    COPY CODE
    
    add_action( 'after_setup_theme', 'kleo_custom_media_size', 20 );
    
    function kleo_custom_media_size() {
        global $kleo_config;
        $kleo_config['post_gallery_img_width'] = 480; //initial was 480
        $kleo_config['post_gallery_img_height'] = 480; //initial was 270
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #91551
     wbishop
    Participant

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?