Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #867179

    Hi,

    Is it possible to set the option ‘header transparent with borders’ as default? Searching on this forum I found this, the technic is right the same I suppose, but I need the option with the border.

    Can you help me with this?

    Regards,

    Erwin

    #867398

    Hey erwin_m,

    Unfortunately, add the transparent header as default isnt possible, you can do it selecting the option manually on the page templates. We can add the border using custom CSS code if youre interested, provide to us your website link in a secure note.

    Best regards,
    John Torvik

    #867499

    Hi,
    I’m sorry, linked the wrong topic on your support-forum. The right topic is this. In this topic Ismael is giving the code for a glassy header by default. This is still working great, have tested it. I’m only looking for the right id for the transparant header with border. See the given code below.

    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 header_glassy ';
            }
    
            $counter++;
        }
    
    	return $elements;
    }

    Regards,

    Erwin

    #867563

    Hi Erwin,

    Can you show us what you’ve got so far? Did you put this code to work?

    Best regards,
    Victoria

    #867896

    Hi Victoria,

    I’ve first used the code mentioned above, that was working fine. Adding a page the transparent header ws already selected. So I went searching in functions-enfold.php for glassy and found an ID. Changing this gives me the following code:

    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 header_with_border ';
            }
    
            $counter++;
        }
    
    	return $elements;
    }

    Unfortunately the code didn’t work anymore with the change of ‘header_with_border’.

    So, if you can help me with this, that would be great.

    Regards,

    Erwin

    #868509

    Hi,

    There’s an unwanted space right after the “header_with_border” value. Please remove it.

    $elements[$counter]['std'] = 'header_transparent header_with_border ';
    

    Replace it with:

    $elements[$counter]['std'] = 'header_transparent header_with_border';
    

    Best regards,
    Ismael

    #868604

    Hi Ismael,

    Thank you! Now I have the transparant header with border as default.

    I did notice the space at the end, but it was also there with the glassy one and then it functioned, strange. Glas that it’s solved.

    You can close the topic.

    Regards,
    Erwin

    #869070

    Hi Erwin,

    Thanks for the feedback. I’ll go ahead and close the topic for now, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

    #869071

    Forgot to close :-)

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Transparent header with borders as default’ is closed to new replies.