Tagged: Burger Menu, enfold
-
AuthorPosts
-
October 6, 2017 at 10:05 am #860921
Hi I would like to know if there is the possibility of displaying the burger menu together with the full overlay menu display only in the home page. In the rest of the pages I would like to keep the default top menu with single items displayed as text.
Thanks
October 6, 2017 at 1:50 pm #861015Hey Elena,
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
.page-id-3338 <---you home page class .av-burger-menu-main { display: block; }
If you need further assistance please let us know.
Best regards,
VictoriaOctober 6, 2017 at 2:08 pm #861025Hi Victoria, sorry I was not very clear in my previous message. What I need is to have the standard text menu on top for the whole web site, except for the home page, where I wish to display only the burger menu.
I imagine that I could use your code above and hide the standard menu. Is that right?
I could therefore hide each single
- class=menu-ietm-xxxx, and keep visible only the class=av-burger-menu, however it’s a mess as everytime I add a new menu voice I should change my css. Is there a simplest way to do it?
Thanks very much
- This reply was modified 7 years, 1 month ago by elenapoliti.
October 9, 2017 at 4:19 pm #861962Hi elenapoliti,
No the code above shows the burger along with the menu, that’s how I understood the original post. Thanks for the clarification.
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaJanuary 30, 2018 at 2:16 pm #904897Do you have a answer for that, for all ?
thanksJanuary 30, 2018 at 2:27 pm #904905I actually decided to have only a burger menu, since I didn’t find any better solution.
January 30, 2018 at 2:30 pm #904910so no answer from the moderator ? thanks a lot
January 30, 2018 at 3:54 pm #904962I tried something, half good. It works, but I can’t get it to NOT work on the homepage… so still useless. Any idea ?
In the functions.php file :if ( !is_front_page() ) { echo' <style type="text/css"> .js_active.html_burger_menu #avia-menu > li { display: block !important } .js_active.html_burger_menu #avia-menu .av-burger-menu-main { display: none !important } </style> '; }
- This reply was modified 6 years, 9 months ago by precarre.
January 30, 2018 at 4:10 pm #904973IT WORKS!!!!!!
It works just fine putting it in the template-builder.php file<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config, $post; if ( post_password_required() ) { get_template_part( 'page' ); exit(); } /***************************************************/// /****** MENU BURGER OFF IF NOT NOT NOT HOMEPAGE. */// if ( !is_front_page() ) { echo' <style type="text/css"> .js_active.html_burger_menu #avia-menu > li { display: block !important } .js_active.html_burger_menu #avia-menu .av-burger-menu-main { display: none !important } </style> '; } /***************************************************/// /***************************************************/// /***************************************************///
January 30, 2018 at 4:24 pm #904976NB : works better in the header.php
January 31, 2018 at 9:37 am #905438Hi,
Sorry for the late response and glad that you found the solution :)
Best regards,
NikkoOctober 8, 2018 at 3:52 pm #1019021I tried your code and it works. Only thing is, when entering the site in mobiles, then the burger also disappears in all pages except home. How to keep burger in every page in mobile? Thanx!
October 8, 2018 at 5:29 pm #1019056this should help
/***************************************************///
/****** MENU BURGER OFF IF NOT NOT NOT HOMEPAGE. *///if ( !is_front_page() ) {
echo’
<style type=”text/css”>@media all {
@media only screen and (min-width: 860px) {.js_active.html_burger_menu #avia-menu > li {
display: block !important
}.js_active.html_burger_menu #avia-menu .av-burger-menu-main {
display: none !important
}}
}</style>
‘;
}/***************************************************///
/***************************************************///October 8, 2018 at 7:40 pm #1019165That is just perfect!
Thanx for the quick response ;)
October 9, 2018 at 9:18 am #1019397 - class=menu-ietm-xxxx, and keep visible only the class=av-burger-menu, however it’s a mess as everytime I add a new menu voice I should change my css. Is there a simplest way to do it?
-
AuthorPosts
- You must be logged in to reply to this topic.