Display original image

Home Forums Gillion Theme Display original image

Home Forums Gillion Theme Display original image

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    RESOLVED Posts
  • hife2017
    Participant

    Hi Shufflehound support,

     

    I’d like to display 100% image height as it originally looks like in blog post. Which means are there any way that will not crop the image?

    How can I achieve that?

     

    Thanks

     

    Attachments:
    You must be logged in to view attached files.

    Hi @hife2017,

     

    Thank you for your question.

     

    Could you please share me the page URL from your site where it is displaying so that i can help you?

     

    Best regards,
    Shufflehound team

    Solution for this topic

    You can try achieving this by using the attached small plugin specially developed for you that contains some custom code.

    Attachments:
    You must be logged in to view attached files.

    hife2017
    Participant

    Hi Shufflehound support,

     

    Thank you for the custom code!!

    But After I install it, it still doesn’t work as I expect.

    The image is cropped by 792×675, I want to make it original size.

     

    Thank you

    Attachments:
    You must be logged in to view attached files.

    Then also please try regenerating thumbnails on your site using the following plugin.

     

    https://wordpress.org/plugins/force-regenerate-thumbnails/

    hife2017
    Participant

    Hi Shufflehound support,

     

    I’ve tried the plugin and regenerate all images, but it still would crop the image.

    I was trying to achieve like in attachment image

    How can i achieve that?

     

    Thanks

    Attachments:
    You must be logged in to view attached files.

    Solution for this topic

    I have made it work by adding following code in the functions.php file of your child theme so could you please confirm whether it is working fine for you?

     

    function gillion_general_setup() {
    
    		/* Add RSS feed links to <head> for posts and comments */
    		add_theme_support( 'automatic-feed-links' );
    
            /* Add editor style */
            add_editor_style(  get_template_directory_uri() . '/css/admin/editor-style.css' );
    
    		/* Enable support for post thumbnails, and declare multiple sizes */
            add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 585, 372, true );
            add_image_size( 'gillion-portrait', 372, 484, true );
            add_image_size( 'gillion-square', 585, 585, true );
            add_image_size( 'gillion-square-small', 220, 220, true );
            add_image_size( 'gillion-square-micro', 80, 80, true );
            add_image_size( 'gillion-landscape-small', 420, 265, true );
            add_image_size( 'gillion-landscape-large', 9999, 9999, true );
            add_image_size( 'gillion-masonry', 585, 1170, false );
    
    		/* Other init */
    		add_theme_support( 'title-tag' );
    		//add_theme_support( 'custom-background' );
    		//add_theme_support( 'custom-header' );
    		add_theme_support( 'html5', array(
    			'search-form',
    			'comment-form',
    			'comment-list',
    			'gallery',
    			'caption'
    		) );
    
    		/* Enable support for Post Formats */
    		add_theme_support( 'post-formats', array(
    			'gallery',
    			'quote',
    			'link',
    			'video',
    			'audio',
    		) );
    
    		/* KingComposer template path */
            global $kc;
            if( isset( $kc ) ) :
            	$kc->set_template_path( get_template_directory().'/inc/elements/builder-king-composer-elements/' );
            endif;
    
    
    	}
    	add_action( 'init', 'gillion_general_setup' );

    hife2017
    Participant

    Hi Shufflehound support,

     

    Yes, it works really well!

     

    Thank you so much.

    You are most welcome here 🙂

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