[Resolved] Animated Hamburger Icon

Home Forums Support [Resolved] Animated Hamburger Icon

Home Forums Support Animated Hamburger Icon

  • This topic has 64 replies, 5 voices, and was last updated 5 years ago by Tom.
Viewing 15 posts - 16 through 30 (of 65 total)
  • Author
    Posts
  • #581328
    Tom
    Lead Developer
    Lead Developer

    Which animation are you wanting to add?

    #581330
    liorsade8

    doesnt really matter… as long i will know how to control it later and change if i need to.
    for now: Collapse or spin

    #581359
    Tom
    Lead Developer
    Lead Developer

    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;
    }
    #581360
    liorsade8

    checking…

    #581362
    liorsade8

    but there is no actual file called: hamburgers.css

    #581368
    liorsade8

    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

    #581402
    liorsade8

    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&#8221; rel=”stylesheet”>

    #581408
    liorsade8

    but still no good…

    #581840
    Tom
    Lead Developer
    Lead Developer

    Are you sure the function is added and activated? I’m not seeing the HTML being added.

    #581854
    liorsade8

    Hi
    Yes
    I think so
    This is why I screen shot what I’ve done

    #582216
    Tom
    Lead Developer
    Lead Developer

    Strange, that function isn’t firing.

    The child theme is active obviously? No caching?

    #582312
    liorsade8

    No caching…

    #582774
    Tom
    Lead Developer
    Lead Developer

    Can you try using the Code Snippets plugin to add the function instead?: https://docs.generatepress.com/article/adding-php/

    #582778
    liorsade8

    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

    #582859
    liorsade8

    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

Viewing 15 posts - 16 through 30 (of 65 total)
  • The topic ‘Animated Hamburger Icon’ is closed to new replies.