Black Friday! Get up to 25% off GP Premium! Learn more ➝

Reply To: derivative themes

Home Forums Support derivative themes Reply To: derivative themes

Home Forums Support derivative themes Reply To: derivative themes

#242086
Tom
Lead Developer
Lead Developer

Hi Henry,

Well, the easiest way is to just use the Customizer – they override those defaults.

If you want to use functions, then the perfect examples are right there in the Exhibit theme.

You would just copy the entire function, for example:

if ( !function_exists( 'exhibit_defaults' ) ) :
add_filter( 'generate_option_defaults','exhibit_defaults' );
function exhibit_defaults( $exhibit_defaults )
{
	$exhibit_defaults[ 'hide_title' ] = '';
	$exhibit_defaults[ 'hide_tagline' ] = '';
	$exhibit_defaults[ 'logo' ] = '';
	$exhibit_defaults[ 'container_width' ] = '1220';
	$exhibit_defaults[ 'header_layout_setting' ] = 'fluid-header';
	$exhibit_defaults[ 'center_header' ] = 'true';
	$exhibit_defaults[ 'center_nav' ] = 'true';
	$exhibit_defaults[ 'nav_alignment_setting' ] = 'center';
	$exhibit_defaults[ 'header_alignment_setting' ] = 'center';
	$exhibit_defaults[ 'nav_layout_setting' ] = 'fluid-nav';
	$exhibit_defaults[ 'nav_position_setting' ] = 'nav-below-header';
	$exhibit_defaults[ 'nav_search' ] = 'enable';
	$exhibit_defaults[ 'nav_dropdown_type' ] = 'hover';
	$exhibit_defaults[ 'content_layout_setting' ] = 'separate-containers';
	$exhibit_defaults[ 'layout_setting' ] = 'right-sidebar';
	$exhibit_defaults[ 'blog_layout_setting' ] = 'right-sidebar';
	$exhibit_defaults[ 'single_layout_setting' ] = 'right-sidebar';
	$exhibit_defaults[ 'post_content' ] = 'full';
	$exhibit_defaults[ 'footer_layout_setting' ] = 'fluid-footer';
	$exhibit_defaults[ 'footer_widget_setting' ] = '3';
	$exhibit_defaults[ 'back_to_top' ] = '';
	$exhibit_defaults[ 'background_color' ] = '#9e9e9e';
	$exhibit_defaults[ 'text_color' ] = '#3a3a3a';
	$exhibit_defaults[ 'link_color' ] = '#1e73be';
	$exhibit_defaults[ 'link_color_hover' ] = '#222222';
	$exhibit_defaults[ 'link_color_visited' ] = '';
	
	return $exhibit_defaults;
}
endif;

But you would give it a different function name.

There isn’t any documentation for that currently, you would have to look into the customizer.php and functions.php of those add-ons to see all of the options available to you.

Hope this helps 🙂