Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #296442

    Hello,

    is there any way to change the image size of the magazine element hero image? The theme seems to always use the – in my view – false predefined image size so that the images are always very narrow. I’d rather like to have a square hero image on the side.

    Thanks in advance!

    #297331

    Hi alwo!

    Yes you can use a filter to change the thumbnail size – insert this code into the child theme functions.php (or enfold/functions.php) file:

    
    add_filter('avf_magazine_settings', 'avia_magazine_thumbnail', 10, 2);
    function avia_magazine_thumbnail($atts, $magazine){
    $atts['image_size']['small'] = 'square';
    return $atts;
    }
    

    You can replace “square” with another thumbnail size like: ‘masonry’, featured’, ‘featured_large’, ‘portfolio’, ‘gallery’, ‘entry_with_sidebar’,’entry_without_sidebar’,extra_large’ or “magazine”

    Best regards,
    Peter

    #297405

    Hey Peter

    thanks for the help! I get a syntax error un the second and third line of you code, can you check if there is something wrong with it?

    Cheers
    Tom

    #297476

    Hi!

    I tested Dude’s code on my installation and it works fine without errors. Please post the whole functions.php with the suggested code on pastebin.com.

    Best regards,
    Ismael

    #297596

    Hello

    Tried it again and it work now – yet this is only changing the size of the featured images of the other articles not the hero image. I chose the magazine element to display the first post bigger beside the others, I want this images to be squared …

    Thanks!

    #299766

    Hey!

    If you want to change the size of the featured image too use this code:

    
    add_filter('avf_magazine_settings', 'avia_magazine_thumbnail', 10, 2);
    function avia_magazine_thumbnail($atts, $magazine){
    $atts['image_size']['small'] = 'square';
    $atts['image_size']['big'] = 'entry_without_sidebar';
    return $atts;
    }
    

    The second size (set to “entry_without_sidebar”) will determine the size of the fearured image, the other size (set to “square”) the size of all other thumbnails.

    Cheers!
    Peter

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

You must be logged in to reply to this topic.