Support » Theme: Oxygen » Call Larger Sized Featured Image in Post

  • I thought I’d ask if might direct me to an easy way to call a larger featured image for a post. I have modified the template to loose the 2nd widget sidebar so the content stretches for 4/5 of the container. Currently it calls an the image sized at 470×260 but then displays an image that is 750×415.

    My current workaround is to upload the image through WordPress and then through FTP re-upload the image in the correct aspect ratio but give it the bumper of -470×260. This is not very elegant and it is time consuming.

    There are two things I need to resolve to get this working:
    1) have a 750×415 image created in the content folder when uploaded
    2) have the post template call this 750×415 image instead of the 470×260

    Many thanks for your input.

    Example Post:
    http://lasportsworld.com/youth/sukkot-camp-oct-19-21/

    Running 0.6.0 with WordPress 4.6.1

Viewing 1 replies (of 1 total)
  • Hello,

    you have to change the size of the single-thumbnail.

    # If you do not use a child theme

    1. Change line 214 in functions.php to:
    add_image_size( 'single-thumbnail', 750, 415, true );

    2. Change width and height in line 44 in post.php

    (after a theme update this must be done again)

    # if you use a child theme

    1. Put this code in the functions.php of your child theme:

    
    add_action( 'after_setup_theme', 'new_theme_setup', 11 );
    
    function new_theme_setup() {
    	remove_action( 'init', 'oxygen_image_sizes' );
    	add_action( 'init', 'new_image_sizes' );
    	}
    	
    function new_image_sizes() {
    	add_image_size( 'archive-thumbnail', 470, 140, true ); 
        add_image_size( 'single-thumbnail', 750, 415, true );
        add_image_size( 'featured-thumbnail', 750, 380, true );
        add_image_size( 'slider-nav-thumbnail', 110, 70, true );
    	}
    

    (‘new_’ can be changed to any string)

    2. Change width and height in line 44 in post.php of your child theme

Viewing 1 replies (of 1 total)
  • The topic ‘Call Larger Sized Featured Image in Post’ is closed to new replies.