Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1292404

    Hello Kriesi team,

    I’ve added some function.php code I found in a related thread but couldn’t get the expected results (social icons at the bottom of the slide-out mobile menu), so I was wondering if you could please quickly check my site out in order to spot any possible issues?

    // add social icons inside the mobile menu
    function ava_custom_script_mod_social(){
    ?>
    <script>
    (function($){
    var int = ”;
    function a() {
    var isMobile = $(‘.av-burger-menu-main’).css(‘display’),
    htmlString = $(‘#header_main .social_bookmarks:first’).find(‘li a’),
    mobileMenu = $(‘.av-burger-overlay’),
    socialString = [];

    if(isMobile == ‘none’) return;
    if($(‘.burger-social’).length) clearInterval(int);

    htmlString.each(function() {
    var socialClass = $(this).parent(‘li’).attr(‘class’),
    socialItems = $(this).wrap(‘<li class=”‘+ socialClass + ‘ av-active-burger-items burger-social”></div>’).parent().unwrap();
    socialString.push(socialItems);
    });

    $(socialString).each(function() {
    $(this).appendTo(‘#av-burger-menu-ul’);
    });
    }

    $(‘#header’).on(‘mousedown’, ‘.av-main-nav-wrap’, function() {
    int = setInterval(function() {
    a();
    }, 500);
    });

    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘ava_custom_script_mod_social’);

    Thank you in advance.

    Best regards,

    H

    #1292763

    Hey Harold,
    Thank you for your patience and the link to your site, but I don’t see that you have any social icons activated on the desktop version header, the script above grabs these social icons and places them in the mobile menu. So please try enabling them and trying again.

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.