- This topic has 64 replies, 5 voices, and was last updated 6 years, 11 months ago by
Tom.
-
AuthorPosts
-
May 21, 2018 at 8:52 pm #581328
Tom
Lead DeveloperLead DeveloperWhich animation are you wanting to add?
May 21, 2018 at 8:55 pm #581330liorsade8
doesnt really matter… as long i will know how to control it later and change if i need to.
for now: Collapse or spinMay 21, 2018 at 9:41 pm #581359Tom
Lead DeveloperLead DeveloperCouple things:
1. This line needs to actually link to the file in your child theme:
<link href="dist/hamburgers.css" rel="stylesheet">So instead of
dist/hamburgers.css, you would putyoururl.com/to/child/theme/hamburgers.css.2. Use this as your function:
add_action( 'generate_inside_mobile_menu', function() { ?> <div class="hamburger hamburger--collapse"> <div class="hamburger-box"> <div class="hamburger-inner"></div> </div> </div> <?php } );3. Add this CSS:
.menu-toggle .mobile-menu, .menu-toggle:before { display: none; }May 21, 2018 at 9:42 pm #581360liorsade8
checking…
May 21, 2018 at 9:44 pm #581362liorsade8
but there is no actual file called: hamburgers.css
May 21, 2018 at 9:56 pm #581368liorsade8
hi
no luck….
see:editor screenshot:
https://prnt.sc/jkyoqkftp screenshot:
https://prnt.sc/jkypgxhooks screenshot:
http://prntscr.com/jkyp9vcss screenshot:
https://prnt.sc/jkyp2mplease help tom
tell me what’s wrong…
thanksMay 21, 2018 at 11:41 pm #581402liorsade8
hi sorry
i saw a mistake i made:
this is the correct line in hooks:
<link href=”http://menuhamburgerstest.s178.upress.link/wp-content/themes/generatepress_child/dist/hamburgers.css” rel=”stylesheet”>May 22, 2018 at 12:02 am #581408liorsade8
but still no good…
May 22, 2018 at 8:59 am #581840Tom
Lead DeveloperLead DeveloperAre you sure the function is added and activated? I’m not seeing the HTML being added.
May 22, 2018 at 9:09 am #581854liorsade8
Hi
Yes
I think so
This is why I screen shot what I’ve doneMay 22, 2018 at 7:13 pm #582216Tom
Lead DeveloperLead DeveloperStrange, that function isn’t firing.
The child theme is active obviously? No caching?
May 22, 2018 at 10:39 pm #582312liorsade8
No caching…
May 23, 2018 at 9:23 am #582774Tom
Lead DeveloperLead DeveloperCan you try using the Code Snippets plugin to add the function instead?: https://docs.generatepress.com/article/adding-php/
May 23, 2018 at 9:25 am #582778liorsade8
Yes of course
Will try
Don’t know it…. but will try
Any thing do put / do once I installed it?
Also – I hate using extra plugins for my sites
But for this try I will do whatever you want of course…I’ll update in an hour
ThanksMay 23, 2018 at 11:31 am #582859liorsade8
hi
i try but not working.tom – do u have a site that it’s working for you guys?
can you put it on a site with clean generatepress theme and child theme and code (not snippet) and tell me if it’s even working for you (with the most updated theme of yours).
or even show me….thanks
-
AuthorPosts
- The topic ‘Animated Hamburger Icon’ is closed to new replies.