Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #943204

    Is there a way to change the default settings for an image caption in the avia builder? I want the following settings to be in place every time a photo is put into a post:

    Image caption: Yes
    Caption Custom Font Size: default
    Caption Appearance: Only display on hover
    Caption Overlay Opacity: 0.4
    Caption Overlay Background Colour: #2c353d
    Caption Font Colour: #ffffff

    #944028

    Hey ChristineGerman,

    Thank you for using Enfold.

    Yes, this is possible. Please add this filter in the functions.php file.

    add_filter('avf_template_builder_shortcode_elements', 'avf_template_builder_shortcode_elements_mod', 10, 9999);
    function avf_template_builder_shortcode_elements_mod($elements) {
    	$counter = 0;
        foreach($elements as $element)
        {
    		// enable image caption by default
    		if($element['id'] == 'caption')  {
    			$elements[$counter]['std'] = 'yes';
            }
    
            $counter++;
    	}
    	return $elements;
    }
    

    Best regards,
    Ismael

    #946962

    I do have a child theme setup…Can I add that somehow as a shortcode .php file?

    #946963

    I tried adding it to the functions.php file and it hasn’t changed anything

    #947724

    Hi ChristineGerman,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

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