Can I make the default header layout be Transparent? So I don’t have to go in and change the header selection on every page or post I do? The large website I am working on will have all pages and posts have the transparent header.
Hi Lane!
Please add following code to Functions.php file of your child theme in Appearance > Editor
add_action( 'after_setup_theme', 'enfold_customization_product_switch' );
function enfold_customization_product_switch(){
add_filter('avf_builder_elements', 'avf_builder_elements_mod');
}
function avf_builder_elements_mod($elements)
{
$counter = 0;
foreach($elements as $element)
{
if($element['id'] == 'header_transparency') {
$elements[$counter]['std'] = 'header_transparent ';
}
$counter++;
}
return $elements;
}
and new pages would have transparent header by default
Regards,
Yigit
I tried to do this but it seems to be breaking site? Confused about the child theme a bit. Do I need to copy the entire functions file into my child theme? Or can I just add code like this to a ‘new’ blank php file?
Thanks!