• Zolf,
    could you advise how to make my featured images small with a left align at the main page? And how to cancel them from a single posts? I lost 2 days and without results…
    Here: https://obserwatore.eu/ you can see that in the post at the bottom (kiedy jak i co) is the picture-always big. Only thing which I can do is to move up/down the entry title.
    In advance thanks a lot for your help and time.
    JAg

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Brian Harris

    (@zgani)

    Hello Jag,

    That would only be possible via a child theme.

    How comfortable are you with PHP/CSS code?

    Regards,
    Zulf

    Thread Starter JagZaw6949

    (@jagzaw6949)

    Hi,
    more or less I get it.
    The problem can be in this part?

    @media screen and (min-width: 1040px) {
    .site-content .has-post-thumbnail .entry-header {
    margin-top: -48px;
    }
    JAg

    Theme Author Brian Harris

    (@zgani)

    No, that part pulls the content up so it slightly overlaps the featured image – a design decision.

    To change the featured image sixes you’d be looking at changing the set_post_thumbnail_size and add_image_size values in the after_setup_theme function callback.

    You’d then apply the new values to the output via the child theme’s template-tags file using a custom function callback.

    Hope that makes sense and points you in the right direction.

    Regards,
    Zulf

    Thread Starter JagZaw6949

    (@jagzaw6949)

    Oh, thanks!
    In functions.php I have however 2 sizes already. Maybe the name the smalled one should be changed into”featured image”? Or should be added px after numbers?

    add_theme_support( ‘automatic-feed-links’ );

    // Enable support for Post Thumbnails, and declare two sizes.
    add_theme_support( ‘post-thumbnails’ );
    set_post_thumbnail_size( 672, 372, true );
    add_image_size( ‘ridizain-full-width’, 1380, 770, true );
    add_image_size( ‘ridizain-recentpost-thumb’, 372, 186, true );

    JAg

    I think we’re looking for the same set of instructions on how to actually change those defaults – my thread is here:

    https://www.ads-software.com/support/topic/set-standard-featured-image-size

    Just changing the sizes in that code in a Child Theme’s function.php file does not change how the images are displayed. Changing the values in the original theme files would, but that defeats the purpose of using a Child Theme at all! So, Zulf, can you please point us to instructions on how to make changes to that functionality in a Child Theme?

    (cross posted to my original thread as well)

    Solution!

    This page was very helpful: https://codex.www.ads-software.com/Plugin_API/Action_Reference/after_setup_theme

    /* Set Default Featured Image Sizes */
    
    add_action( 'after_setup_theme', 'ridizain_setup' );
    
    function ridizain_setup() {
    
    	// Enable support for Post Thumbnails, and declare two sizes.
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 400, 300, true );
    	add_image_size( 'ridizain-full-width', 600, 400, true );
    	add_image_size( 'ridizain-recentpost-thumb', 250, 250, true );
    }

    You have to keep “ridizain_setup” named exactly that for it to override what’s in the original theme functions.php file. The values you choose in the size lines can be whatever you want.

    Theme Author Brian Harris

    (@zgani)

    Glad you found the information you need.

    Please also refer to my response here: https://www.ads-software.com/support/topic/set-standard-featured-image-size?replies=6#post-5397167

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘featured image’ is closed to new replies.