January 9, 2020 at 2:04 pm
Hello Team Kadence!
I need to have the default for the ‘Display a sidebar on the Home Page?’ under Theme Options > Home Layout to default to ‘sidebar’, instead of ‘full’. I tried setting it using:
function wpto_home_sidebar_layout( $field ) {
$field['subtitle'] = __( 'The default is set to sidebar.', 'virtue_premium' );
$field['default'] = __( 'sidebar', 'virtue_premium' );
return $field;
}
add_filter( 'redux/options/virtue_premium/field/home_sidebar_layout/register', 'wpto_home_sidebar_layout', 1 );
I also tried:
function wpto_home_sidebar_layout( $field ) {
$field['subtitle'] = __( 'The default is set to sidebar.', 'virtue_premium' );
$field['default'] = 'sidebar';
return $field;
}
add_filter( 'redux/options/virtue_premium/field/home_sidebar_layout/register', 'wpto_home_sidebar_layout', 1 );
But neither seem to work. The subtitle (and any other field I want to use) do seem to work though. What is the best way to accomplish this? Thank you!