customizer-presets.php into child theme

Hi,

I have made some modifications into the presets, I’m using the bb-theme-child and I notice that if I do my changes to the child theme I do not see the new presets. Everything is working fine if I upload the customizer-presets.php into bb-theme.

How can I make these modifications into my child theme to make sure to not loose any modifications to the presets when upgrading?

Thank you for your help!

Hey Jonathan,

Just letting you know that I’ve already assigned another member of the team to assist you with your concern. :slight_smile:

Thanks!

KC

Hey Jonathan,

What about adding a new Preset instead? Will that work for you? Check out the link below for more info! :slight_smile:
http://forum.wpbeaverbuilder.com/knowledge-base/adding-and-removing-presets/

Ben

This is what I have done. I added new presets and everything is working perfectly. My problem is: if I upload “customizer-presets.php” into :

/bb-theme-child/inlcudes/customizer-presets.php (it’s not working)

/bb-theme/inlcudes/customizer-presets.php (it’s working!!)

I would like to be able to have that file into the child theme. Do you have an idea why it’s not working into the child theme?

Thanks for your help!

Hey Jonathan,

Following the KB article provided by Ben, just insert code below into the functions.php file of your Child Theme to create a new custom preset. There’s no need to create/include a new php file for this. Let us know how it goes! :slight_smile:

function my_custom_presets()
{
    FLCustomizer::add_preset( 'my-preset', array(
        'name'      => 'Custom Preset',
		'skin'      => 'default',
		'settings'  => array(
		'fl-body-bg-color'             	=> '#282a2e',
		'fl-accent'                 	=> '#95bf48',
		'fl-accent-hover'           	=> '#95bf48',
		'fl-heading-text-color'     	=> '#95bf48',
		'fl-topbar-bg-color'        	=> '#3e4147',
		'fl-topbar-text-color'		=> '#a6a6a6',
		'fl-topbar-link-color'		=> '#a6a6a6',
		'fl-topbar-hover-color'		=> '#95bf48',
		'fl-header-bg-color'        	=> '#282a2e',
		'fl-header-text-color'		=> '#a6a6a6',
		'fl-header-link-color'		=> '#a6a6a6',
		'fl-header-hover-color'		=> '#95bf48',
		'fl-nav-bg-color'           	=> '#282a2e',
		'fl-nav-link-color'		=> '#a6a6a6',
		'fl-nav-hover-color'		=> '#95bf48',
		'fl-footer-widgets-bg-color'	=> '#282a2e',
		'fl-footer-widgets-text-color'	=> '#a6a6a6',
		'fl-footer-widgets-link-color'	=> '#95bf48',
		'fl-footer-widgets-hover-color'	=> '#95bf48',
		'fl-footer-bg-color'		=> '#282a2e',
		'fl-footer-text-color'		=> '#a6a6a6',
		'fl-footer-link-color'		=> '#95bf48',
		'fl-footer-hover-color'		=> '#95bf48'
        )
    ));
}

add_action( 'after_setup_theme', 'my_custom_presets', 11 );

Thanks!

KC

Working perfectly!!!

Thanks!

Hey Jonathan,

That’s good to know and glad we could help! Enjoy BB! :slight_smile:

Ben