Archived topic
Animated Hamburger Icon
64 replies · Started by Jonathan on May 2, 2018
Which animation are you wanting to add?
doesnt really matter... as long i will know how to control it later and change if i need to.
for now: Collapse or spin
Couple 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 put yoururl.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;
}
checking...
but there is no actual file called: hamburgers.css
hi
no luck....
see:
editor screenshot:
https://prnt.sc/jkyoqk
ftp screenshot:
https://prnt.sc/jkypgx
hooks screenshot:
http://prntscr.com/jkyp9v
css screenshot:
https://prnt.sc/jkyp2m
please help tom
tell me what's wrong...
thanks
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">
but still no good...
Are you sure the function is added and activated? I'm not seeing the HTML being added.
Hi
Yes
I think so
This is why I screen shot what I've done
Strange, that function isn't firing.
The child theme is active obviously? No caching?
No caching...
Can you try using the Code Snippets plugin to add the function instead?: https://docs.generatepress.com/article/adding-php/
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
Thanks
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