Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #934202

    Hi there, I would like to set by the default this value into another.

    Image

    I tried to use this php snipset but it doesn’t work.

    add_action( 'after_setup_theme', 'enfold_additional_settings' );
    function enfold_additional_settings(){
    	add_filter('avf_builder_boxes', 'avf_enfold_additional_settings_mod');
    }
    
    function avf_enfold_additional_settings_mod($elements)
    {
    		// Layout > Sidebar Settings
    		if($element['id'] == '_preview_display')  {
    			/**
    			 *
    			 * Available Options
    			 * No Sidebar  = fullsize
    			 * Left Sidebar = sidebar_left
    			 * Right Sidebar = sidebar_right
    			 * MOD: Set the Layout > Sidebar Settings to "No Sidebar"
    			 *
    			**/
                $elements[$counter]['std'] = 'no';
            }
    		
    	return $elements;
    }
    #934219

    I found the solution. I removed the foreach function. This will be the code:

    add_action( 'after_setup_theme', 'ava_enfold_builder_layout_mod' );
    function ava_enfold_builder_layout_mod(){
    	add_filter('avf_builder_elements', 'avf_enfold_builder_layout_settings_mod');
    }
    
    function avf_enfold_builder_layout_settings_mod($elements)
    {
    	$counter = 0;
        foreach($elements as $element)
        {
    		// Ajax Portfolio Preview Settings > Display Preview Images
    		if($element['id'] == '_preview_display')  {
    			/**
    			 *
    			 * Available Options
    			 * Gallery  = gallery
    			 * Slideshow = slideshow
    			 * Image List = list
    			 * Don't show the images at all and display the preview text only = no
    			 * MOD: Set the selector > Display Preview Images "Don't show the images"
    			 *
    			**/
                $elements[$counter]['std'] = 'no';
            }
    
            $counter++;
        }
    	return $elements;
    }
    #934510

    Hi,

    Thank you very much for the update, we appreciate it a lot

    Best regards,
    Basilis

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Change the default value for portfolio additional settings’ is closed to new replies.