Tagged: ismael
-
AuthorPosts
-
October 22, 2017 at 11:32 am #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
October 23, 2017 at 2:20 am #867398Hey erwin_m,
Unfortunately, add the transparent header as default isn
t possible, you can do it selecting the option manually on the page templates. We can add the border using custom CSS code if you
re interested, provide to us your website link in a secure note.Best regards,
John TorvikOctober 23, 2017 at 8:57 am #867499Hi,
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
October 23, 2017 at 11:26 am #867563Hi Erwin,
Can you show us what you’ve got so far? Did you put this code to work?
Best regards,
VictoriaOctober 23, 2017 at 11:46 pm #867896Hi 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
October 25, 2017 at 4:09 am #868509Hi,
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,
IsmaelOctober 25, 2017 at 8:55 am #868604Hi 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,
ErwinOctober 26, 2017 at 6:51 am #869070Hi 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,
RikardOctober 26, 2017 at 6:52 am #869071 -
AuthorPosts
- The topic ‘Transparent header with borders as default’ is closed to new replies.