Forum Replies Created
-
AuthorPosts
-
Hi Guenni,
Thanks so much for all you did.
Everything is working beautifully now. On the edge of 2024 everything is now fixed.
Enjoy NYE, and best wishes in advance.
Cheers,
PieterI did remove all old codes, and pasted the ones you suggested.
So now my style.css is:
@media only screen and (max-width: 989px) { .responsive #top #wrap_all #header .container { width: 95%; max-width: 95%; } #header { position: fixed !important; height: 110px !important; max-height: 110px !important; } #top #header.av_header_transparency #header_meta { background-color: transparent; } #header_main { border-bottom: none; } .responsive #top .av-logo-container , .responsive #top .logo a, .responsive #top .logo img, .responsive #top .logo svg { height: 80px !important; max-height: 80px !important; line-height: 80px !important; } .responsive #top .av-main-nav .menu-item-avia-special a { height: 80px !important; line-height: 80px !important; } .responsive.html_mobile_menu_tablet #top #wrap_all .av_header_transparency { background-color: transparent !important; } #top .header_bg { background-color: transparent !important; } #top #header:not(.av_header_transparency) .header_bg { background-color: #edddc6 !important; } .responsive.html_mobile_menu_tablet #top .av_header_transparency .logo img.alternate, .responsive.html_mobile_menu_tablet #top .av_header_transparency .logo .subtext.avia-svg-logo-sub { display: block !important; } .responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > img, .responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > svg { opacity: 0; } /*** depends on your setting ***/ #top #header.av_header_transparency #header_meta .phone-info * { color: #FFF !important; } .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner, .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::before, .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::after { background-color: #edddc6; } .html_mobile_menu_tablet .header_color #header.av_header_transparency .menu-item-search a:before { color: #FFF; } .responsive #top #main { padding-top: 110px !important; } .responsive #top #main .sticky_placeholder { height: 0px !important; } } .responsive #top #wrap_all #header.hide-header, #header.hide-header + #main #sub_menu1 { opacity: 0 !important; transition: opacity 1s ease; } .responsive #top #wrap_all #header:not(.hide-header), #header:not(.hide-header) + #main #sub_menu1 { transition: opacity 0.5s ease; }
And my functions.php is:
function close_sub_menu_on_click_items(){ ?> <script type="text/javascript"> (function($) { $('.av-subnav-menu .menu-item a').on('click', function() { $(this).closest('.av-subnav-menu').removeClass('av-open-submenu'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'close_sub_menu_on_click_items');
That’s what is there. All cache is cleared, browser, wordpress, plugins.
Hi Guenni,
Our answers crossed.
I have added the functions code now too.
There are two codes in the functions together now:
function hide_header(){ ?> <script> (function($){ 'use strict'; var c, currentScrollTop = 0, header = $('#header'); $(window).scroll(function () { var a = $(window).scrollTop(); var b = header.height(); currentScrollTop = a; if (c < currentScrollTop && a > b ) { header.addClass("hide-header"); } else if (c > currentScrollTop && !(a <= b)) { header.removeClass("hide-header"); } c = currentScrollTop; }); })(jQuery); </script> <?php } add_action('wp_footer', 'hide_header'); function close_sub_menu_on_click_items(){ ?> <script type="text/javascript"> (function($) { $('.av-subnav-menu .menu-item a').on('click', function() { $(this).closest('.av-subnav-menu').removeClass('av-open-submenu'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'close_sub_menu_on_click_items');
It doesn’t seem to do much. Is that because i should have erased the first one? Or is there some tuning to do?
Thanks!
- This reply was modified 2 weeks, 5 days ago by Pietzaa. Reason: spelling
Thanks Guenni,
Ik added the code.
Now:
Wide desktop: perfect.
Narrow desktop: hide/how working fine, no open space. However sub menu is not re-appearing.
Landscape mobile: hide/show working, no open space, However sub menu is not re-appearing.
Portret mobile: secondary menu break up is pushing down logo and scrolling bar. see: https://we.tl/t-5r5CxEoGtN
what should I finetune? Or what are the next steps?
Hi Guenni,
Thanks again for your help and codes.
I feel a bit uncomfortable getting back and forth over this. I have no idea how to read codes, what to adjust etc. There might have been 5 perfectly solutions already and i just don’t see them or pasting it wrong, or not clearing cache.
So with the latest code from https://webers-testseite.de/pietzas/
Desktop wide: perfect! no extra space, both secondary menu, main menu and submenu dis- and re-appear beautifully!
Desktop narrow screen: an extra (see through) space is occurring on top of the header on top of the page.
Mobile Portret: because the secondary menu is breaking into two rules, it pushes down the rest of the contant so the logo and progression bar is overlaying the content again.
Mobile landscape: No problems with the secondary menu, however the submenu is not dis and re-appearing in the same behavior as on the desktop variant.
I have the feeling i am asking for a lot or for something seemingly easy, but practically impossible.
I can recognize color codes and some values, but that’s it.
So if someone knows what to to do, and wants to do it, i am happy to pay for somebody who can get this to work, without me having to adjust or copy stuff that I will then butcher again.
Let me know if there is someone willing to put it all in the right place.
is there a way to make to code css so that:
– the header with main menu and sub menu are showing when first opening the website,
– then upon scroll down, both main menu and sub menu disappear.
– upon scroll up, both main menu and sub menu reappear.In short, make the whole header dis- and re-appear. (header always exists of main menu and sub menu)
All this with no extra space, hovering menus, or disappearing submenus.
I am curious and look forward to the answer.
This kind of worked, however: on desktop sites, the header (main menu) slides up out of sight, while the sub menu kind of hoovers in its place, without a header on top of it.
(so the top (menu) is gone, showing content on top of screen now, then sub menu, then content again.
- This reply was modified 2 weeks, 5 days ago by Pietzaa. Reason: spelling
I love this, tansparrant disappearing menu, however: it doesn’t seem to do anything on mobile.
Is there a way to make this standard on all screens, if so: what do i have to do to make that happen?
Thanks Guenni!
Along with your help we managed to get the header working!
What do you mean by “you had to correct that sub-menu thing!”?
Sorry if it is not clear to me while you are speaking clear language. I am not a coder 😬
I remember why this space is there. But it might be another topic.
It is a color section that is “hiding on mobile/ on smaller screens”. It is only intended to be a header shown on bigger screens. For smaller screens there is a picture (in a fullwidth slider) that is working better than the setup with a header picture.
The hiding of the color section is leaving a blank space (header color)
Is there a way to get rid of this open space at all? Or just ignore it?
- This reply was modified 2 weeks, 6 days ago by Pietzaa.
Mike,
Thanks a lot, maybe it worked before as well. Just had to clear cache. Thanks for checking and all the patience.
I even managed to play with hiding speeds and background color matching the menu.Because I was playing with some scripts I think I might have added extra space to the bottom of the submenu somehow. (only showing on my phones browser. Any idea where that comes from, or, more importantly, how to get rid of it?
Thanks again!
Hi Guenni,
Thanks for getting back so quickly. I pasted the code, nothing is happening though.
I have tried different scripts now that i found on the interwebs, some work partially, some don’t.How is it so hard to make the header reappear upon scroll-up? Shouldn’t there be just a toggle switch for this in the enfold child – header settings?
I can’t be the only one with this problem. All the solutions i find on youtube are based on elementor. Which i don’t have.
Some other solutions are depending on making a js folder in enfold child folder. Then making a .js file and inserting a script, then a code for functions.php and also one for style.php, did a couple of those and none seem to work or do anything at all.
Now another problem occurred though.
When putting the phone in landscape mode, the header of course is too big, covering nearly a third of the screen.
So it might be nice to have it do different things on different modes.
Maybe just the header reappearing when scrolling up. So when scrolling down it disappears.
Or when scrolling down just a burger icon in the top right remains. With no background or button, only the three bars in adjustable color.
Is there a code or possibility to that?
Cheers,
I managed to fix the problem by playing with the numbers. I have changed height and max height to 140px in the #header part of the code. And also on the bottom of the code i changed 110px to 140px at the “responsive top main” part. On my phone it seems to be working well now. Everything including the scroll progression bar is wrapped in the header now.
`@media only screen and (max-width: 989px) {
.responsive #top #wrap_all #header .container {
width: 95%;
max-width: 95%;
}
#header {
position: fixed !important;
height: 140px !important;
max-height: 140px !important;
}
#top #header.av_header_transparency #header_meta {
background-color: transparent;
}
#header_main {
border-bottom: none;
}
.responsive #top .av-logo-container ,
.responsive #top .logo a,
.responsive #top .logo img,
.responsive #top .logo svg {
height: 80px !important;
max-height: 80px !important;
line-height: 80px !important;
}
.responsive #top .av-main-nav .menu-item-avia-special a {
height: 80px !important;
line-height: 80px !important;
}
.responsive.html_mobile_menu_tablet #top #wrap_all .av_header_transparency {
background-color: transparent !important;
}
#top .header_bg {
background-color: transparent !important;
}
#top #header:not(.av_header_transparency) .header_bg {
background-color: #edddc6 !important;
}
.responsive.html_mobile_menu_tablet #top .av_header_transparency .logo img.alternate,
.responsive.html_mobile_menu_tablet #top .av_header_transparency .logo .subtext.avia-svg-logo-sub {
display: block !important;
}
.responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > img,
.responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > svg {
opacity: 0;
}/*** depends on your setting ***/
#top #header.av_header_transparency #header_meta .phone-info * {
color: #FFF !important;
}
.html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner,
.html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::before,
.html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::after {
background-color: #edddc6;
}
.html_mobile_menu_tablet .header_color #header.av_header_transparency .menu-item-search a:before {
color: #FFF;
}
.responsive #top #main {
padding-top: 140px !important;
}
.responsive #top #main .sticky_placeholder {
height: 0px !important;
}
}- This reply was modified 2 weeks, 6 days ago by Pietzaa. Reason: forgot to change the code and made it bold
Hi Thanks,
Thanks a lot for getting back and the tips provided!
It is ok for the header to disappear when scrolling down, that way customers can see more of the content. There is no need to constantly see the whole header.
I don’t see any options in the enfold child – main menu tab to choose a breakpoint.
Also all of my pages have a submenu that breaks to burger on smaller screen. I don’t know what the best solution is for mobile viewers. Most people are viewing the website through mobile i guess nowadays.
I tried pasting your code, and it works for permanently viewing the header, however the submenu disappears upon scrolling, and the logo doesn’t shrink so the logo is overlaying on the content of each page. is there a way to also permanently show the submenu?
Cheers!
Hi Ismael,
Thanks for the reply. I redid all the titles and then run the script, the script however doesn’t overwrite existing alt text, only media in which the alt text box was empty. So now i remove all the wrong alt text and then run the script again. Cheers!
Thanks Ismael for getting back. We are looking into what did what.
I finished all the alt text before the weekend and in the weekend we were trying to finish up the website before launch. They people working on the website might have put some coding in and also tweaked some plugins. I probably have to re-enter all of the alt text by hand again for all of my 700+ photo’s then.
Hi Guenni007,
I entered at one picture: “Young surfers carrying surfboards under their arms are entering the water with an instructor.”
Capitals: I read somewhere to make sure you start the Alt Text with a capital and also use them for names etc. Just as you would when officially writing.
“.”‘s: I mean interpunction. So to make sure to use comma’s and dot’s (or full stops as you would call them in English.Cheers!
December 18, 2024 at 3:37 pm in reply to: Setting up Blog page to function as a Knowledge Base from former website. #1473902Hi Ismael,
Thanks a lot for getting back at me so quickly. Really appreciate it.
I am going to view a couple of how-to video’s on styling and building pages, widgets, menus, etc with blogs on enfold. I should learn a lot more in the coming days. Whenever something is unclear in the future, I will get back.
A good how-to video on Enfold Child can be found here by the way: “https://www.youtube.com/watch?v=Gr4GV8NKMek&t=813s“.
Kind regards,
Pieter -
AuthorPosts