Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #569368

    Hello!

    I was wondering if there was a way to hide the header and footer by default on portfolio pages, instead of having to select “hide the header on this page” and ” hide the footer” options every single time ?

    Same question for the “blank template” for pages, is it possible to make it the default template?

    Thanks a lot!

    #569554

    Hey!

    Please add following code to Functions.php file 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'] == 'footer')  {
                $elements[$counter]['std'] = 'nofooterarea';
            }
    		if($element['id'] == 'header_transparency')  {
                $elements[$counter]['std'] = 'header_transparent header_hidden ';
            }
    
            $counter++;
        }
    
    	return $elements;
    }

    Cheers!
    Yigit

    #569842

    Wow, thanks a lot!
    As I understand, this will apply to every page or post, is there a way to target 1 specific custom content type?

    #571067

    Hi!

    Yes, new ones that you create will have these options by default. How would you like to limit it?

    Best regards,
    Yigit

    #571962

    Well for instance for it to apply only to portfolio items, and not pages.

    #573756

    Hey!

    then add the specific conditional tag to the code, refer to: https://codex.wordpress.org/Conditional_Tags

    Cheers!
    Andy

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