Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #627447

    Hi, I’m trying to fix 2 accessibility errors that are pointing to #advanced_menu_hide and #advanced_menu_toggle links for the mobile menu. I need to add text to the empty links and when I copy includes/helper-main-menu.php to my child theme (child/includes/helper-main-menu.php) it dies right before it should be outputting the <header> that is found in the helper file. How can I override the includes/helper-main-menu.php code in my child theme so that I can add text to the empty links?

    #627503

    Hi voyageurweb!

    That is an include function and can not be overwitted like that
    What action do you want to replace, so we can see if we can make it with a function instead of copying the hole file.

    Regards,
    Basilis

    #628483

    I want to add some text to these two links:

    echo '<a id="advanced_menu_toggle" href="#" '.av_icon_string('mobile_menu').'></a>';
    echo '<a id="advanced_menu_hide" href="#" 	'.av_icon_string('close').'></a>';

    so it’s like:

    echo '<a id="advanced_menu_toggle" href="#" '.av_icon_string('mobile_menu').'>Open Menu</a>';
    echo '<a id="advanced_menu_hide" href="#" 	'.av_icon_string('close').'>Close Menu</a>';

    Line 18 and 19

    #629588

    Hi,

    sorry for the delay, Please try adding this at the very end of your themes / child themes functions.php file:

    
    function addMenuText(){
    ?>
    <script>
         jQuery(document).ready(function() {     
            jQuery("#advanced_menu_toggle").text("Open");     
            jQuery("#advanced_menu_hide").text("Close");    
        });
    </script>
    <?php
    }
    add_action('wp_head', 'addMenuText');

    Then style the fonts by adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:

    
    #advanced_menu_toggle, #advanced_menu_hide {
        font-size: 12px;
    }
    

    Best regards,
    Vinay

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