Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #876763

    Hi there,
    I have read several articles on this website about changing the size of featured image, but all of them where either making changes in functions.php
    of the main theme (which is never recommended for maintenance), or using another plugin ‘Simple Images Sizes’ (which I try to avoid, since having too many plugins isn’t healthy).

    Well, below I’ve come up with my own solution which seems to work in my website. I hope this could become useful to other users…

    1) you need to use the child theme of Enfold

    2) open functions.php, found in …../wp-content/themes/Enfold/enfold-child

    3) in functions.php, paste the following code :

    /**************************************************************************/
    /* Change featured image size for "entry_with_sidebar"       */
    /***************************************************************************/
    function change_featured_image_size( $avia_config_imgSize ) {
    	$avia_config_imgSize['entry_with_sidebar'] 	= array('width'=>849, 'height'=>566) ;  // big images for blog and page entries
    	return $avia_config_imgSize ;
    }
    add_filter('avf_modify_thumb_size', 'change_featured_image_size' );

    In my case, I wanted to change picture with a ‘entry_with_sidebar’ tag, but you might have to change that (other possible values are : ‘featured’, ‘featured_large’, ‘extra_large’, ‘portfolio’, ‘portfolio_small’, ‘entry_without_sidebar’).
    Also the size I wanted was 849 x 566, but you might have to change that as well.

    4) Once this is done, I think that you need to regenerate the thumbnails of each of your image, which can be done via the “Regenerate Thumbnails” plugin (which is a plugin that you don’t need after that, so you can deactivate after use).

    Other than that, you should be good to go :-) !

    #877887

    Hey Ybastien,

    If you use the Advanced layout builder to make your own blog page – you can set the size manually here: http://prntscr.com/hbhoqy and here: http://prntscr.com/hbhoui

    Best regards,
    John Torvik

    #877997

    Hi John,

    Thanks for the tip, indeed I didn’t know about the “blog post” element, which seems pretty useful ! Its funny how I keep discovering interesting features in the Enfold theme…

    However I might not have understood it fully, but this solution seems to display X posts of a specific taxonomy (eg a post category, a post tag etc.). While in my case, i wanted to change the *display of each separate post*. Unless this allow to create some kind of of a template which can then be applied to each single post ? Or maybe I didn’t get how to properly use this element ?

    Anyway we also have +100 posts on our website (its in French : http://5aconseil.com) and the 1st solution allowed me to change all of them at once…

    Best regards

    Bastien

    #878672

    Hi,
    Thanks for sharing your solution, I’m sure other will find it useful.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.