• Resolved costelo

    (@costelo)


    All images get cut when selected as main image. how can thi sbe disabled to mantain common wide size but not get cropped.

Viewing 11 replies - 1 through 11 (of 11 total)
  • What theme are you using? Do you have a live link to it?

    Generally, image sizing + cropping is controlled within your theme’s functions.php file.

    In admin you also have option for thumbnail to either you want to cut or resize only.

    Thread Starter costelo

    (@costelo)

    founder theme

    Theme Author Ben Sibley

    (@bensibley)

    Hi costelo,

    Thanks for choosing Founder!

    As you’ve seen, all Featured Images are cropped to a 2:1 ratio by default. However, you can turn this off with the following CSS:

    .featured-image {
      padding-bottom: 0;
      height: auto;
    }
    .featured-image img {
      position: static;
    }

    Copy & paste the code above into the “Custom CSS” section in the Customizer (Appearance > Customize), and it should take affect right away.

    There is also a Featured Image Size option available in Founder Pro that lets you choose from ten different aspect ratios for your Featured Images (including a “natural dimensions” option).

    Thread Starter costelo

    (@costelo)

    this is the functions.php

    // for displaying featured images
    if( ! function_exists( 'ct_founder_featured_image' ) ) {
    	function ct_founder_featured_image() {
    
    		// get post object
    		global $post;
    
    		// establish featured image var
    		$featured_image = '';
    
    		// if post has an image
    		if ( has_post_thumbnail( $post->ID ) ) {
    
    			if ( is_singular() ) {
    				$featured_image = '<div class="featured-image">' . get_the_post_thumbnail( $post->ID, 'full' ) . '</div>';
    			} else {
    				$featured_image = '<div class="featured-image"><a href="' . get_permalink() . '">' . get_the_title() . get_the_post_thumbnail( $post->ID, 'full' ) . '</a></div>';
    			}
    		}
    Thread Starter costelo

    (@costelo)

    hey i posted before seen response. i was looking at that div class now…

    i will try right away
    thank for response

    Thread Starter costelo

    (@costelo)

    great, it works perfect on featured image pages or posts.
    but the blog list has no images any more.

    https://www.costelo.es/work/ejemplosweb/aretia/blog/

    Thread Starter costelo

    (@costelo)

    the

    .featured-image {
      padding-bottom: 0;
    }

    takes out space for photo.
    is there a way to target CSS to blog page only? like

    .home
    Theme Author Ben Sibley

    (@bensibley)

    I see what’s happening. Try the following CSS instead:

    .featured-image {
      padding-bottom: 0;
      height: auto;
    }
    .featured-image a,
    .featured-image img {
      position: static !important;
    }

    That should allow the featured images to display on the blog again and also use the image’s natural dimensions.

    Thread Starter costelo

    (@costelo)

    perfect, now everything works.

    very nice theme and support
    thanks Ben

    Theme Author Ben Sibley

    (@bensibley)

    You’re welcome ??

    If you’re happy with Founder, could you take just a minute to leave a review? I would really appreciate it.

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘images get cropped when selected as main in article, how to disable?’ is closed to new replies.