Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #608700

    How can I have the mobile menu options dynamically fill the screen regardless of whether it’s vertical or horizontal? I was playing around with the padding, and while that would be an all right solution for just the vertical or horizontal orientations, I’d prefer not to have to manually adjust several @media screen values.

    Is there a way to do this with percentages?


    Hi Michae1!

    Thank you for using Enfold.

    Please add this in the functions.php file:

    // menu mobile
    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    <script type="text/javascript">
    (function($) {
        function a() {
            var mh = $('#mobile-advanced').outerHeight() - 89,
                    mi = $('#mobile-advanced').find('.menu-item'),
                    mc = $(mi).length,
                    nh = mh / mc / 2 - 13;
            $('#advanced_menu_toggle').bind('click', function() {
                        'padding-top' : nh,
                        'padding-bottom' : nh,
             $('#advanced_menu_hide').bind('click', function() {
        setTimeout(a(), 1000);

    And the following css code in the Quick CSS field:

    #mobile-advanced li > a:before, .html_header_mobile_behavior #mobile-advanced span > a:before, #mobile-advanced .mega_menu_title:before {
        top: 40%;



    Thanx Ismael,

    Does it need to be in the core theme functions.php? Or can I just use it in my child functions.php? Because I tried the latter, and it didn’t quite work. I say “not quite” because, it looked like the PHP call at the top and bottom either didn’t need to be there or where inverted. So I deleted them to test that, and it actually worked . . . for a second, then it crashed WordPress (doh!). Luckily WPengine has great backup point management :)


    ~ Michae1



    You can add it in the child theme’s functions.php file. Please post the code of the functions.php file on



    Hi Ismael!

    Here’s the pastebin for my Child Theme Functions. Thanx!!



    We updated the code above. Please replace the code. Remove browser cache or hard refresh before testing the page.



    Hi Ismael!

    It’s updated in the pastebin? <- if so, I didn’t realize pastebin was collaborative. > Or is there another link? Could you tell me what was changed? Thanx!

    ~ Michael


    Gothcya, didn’t realize you updated your post. Still no luck though. Now the bullets are just misaligned :( Thoughts?



    Works fine when I checked it. Could you please provide a screenshot of the issue? Did you add the css code?


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