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

    Hi, I have followed similar post about adding a further thumbnail size for images. In particular in this one (https://kriesi.at/support/topic/generate-new-image-sizes-in-child-theme/) you say that if I create a new rule for thumb size and I still want to have all the rest I must add all the old contents in my new array.

    I wrote the following function with a new thumbnail called ‘page_bottom_section ‘: 2500 x 430

    function avia_change_image_size_array() {
    global $avia_config;
    $avia_config['imgSize']['widget'] 			 	= array('width'=>36,  'height'=>36);						// small preview pics eg sidebar news
    $avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    $avia_config['imgSize']['featured'] 		 	= array('width'=>1500, 'height'=>430 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['featured_large'] 		= array('width'=>1500, 'height'=>630 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['extra_large'] 		 	= array('width'=>1500, 'height'=>1500 , 'crop' => false);	// images for fullscrren slider
    $avia_config['imgSize']['portfolio'] 		 	= array('width'=>495, 'height'=>400 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['portfolio_small'] 		= array('width'=>260, 'height'=>185 );						// images for portfolio 4 columns
    $avia_config['imgSize']['gallery'] 		 		= array('width'=>845, 'height'=>684 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['magazine'] 		 	= array('width'=>710, 'height'=>375 );						// images for magazines
    $avia_config['imgSize']['masonry'] 		 		= array('width'=>705, 'height'=>705 , 'crop' => false);		// images for fullscreen masonry
    $avia_config['imgSize']['entry_with_sidebar'] 	= array('width'=>845, 'height'=>321);		            	// big images for blog and page entries
    $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['page_bottom_section'] 	= array('width'=>2500, 'height'=>430 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);
    
    $avia_config['selectableImgSize'] = array(
    	'square' 				=> __('Square','avia_framework'),
    	'featured'  			=> __('Featured Thin','avia_framework'),
    	'featured_large'  		=> __('Featured Large','avia_framework'),
    	'portfolio' 			=> __('Portfolio','avia_framework'),
    	'gallery' 				=> __('Gallery','avia_framework'),
    	'entry_with_sidebar' 	=> __('Entry with Sidebar','avia_framework'),
    	'entry_without_sidebar'	=> __('Entry without Sidebar','avia_framework'),
    	'extra_large' 			=> __('Fullscreen Sections/Sliders','avia_framework'),
    	'page_bottom_section'	=> __('Section Bottom Page','avia_framework'),
    );
    
    }
    add_action( 'init', 'avia_change_image_size_array');

    However I don’t see my new page_bottom_section in the dropdown list. However, if I add to my function only my rule without the others, from the dropdown menu I won’t see all the 9 rules but 3 plus my rule (so actually it exists!).

    What I did wrong? I wish to have all your 9 rules + mine

    Thank you

    #720291

    Hey Elena,

    Thank you for using Enfold.

    Please remove the modification then use the solution from these threads.

    // https://kriesi.at/support/topic/override-the-global-avia_config-in-a-child-theme/#post-714683
    // https://kriesi.at/support/topic/impossible-to-use-custom-image-sizes-in-slider-accordeon/#post-574335

    Best regards,
    Ismael

    #720973

    Thank you very much Ismael: it works perfectly!

    Elena

    #721073

    Hi,

    Glad we could help!
    We really appreciate it if you rate our theme on themeforest https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding a new thumbnail size to Enfold dropdown list’ is closed to new replies.