Mobile menu empty and Aktivation not work

Latest Reply from idanka at 2017-03-27 16:16:49 Solution
Hi!

Mobil menu empty,
catergory work
page menu empy.

reparable?

url: https://www.media-valko.hu



Hi!

To fix this issue with the mobile menu, please find the code:
function block_sec_menu_mobile() {
?>
<script>
jQuery(document).ready(function(){
jQuery('.menu-topmenu li').each(function() {
jQuery('<option />', {
'value':jQuery(this).find('a').attr('href'),
'text':jQuery(this).find('a').html()
}).appendTo(jQuery('#mobile-sec-menu'));
});
});
</script>
<?php
}

and replace it with:

function block_sec_menu_mobile() {
?>
<script>
jQuery(document).ready(function(){
jQuery('#secondarymenu li').each(function() {
jQuery('<option />', {
'value':jQuery(this).find('a').attr('href'),
'text':jQuery(this).find('a').html()
}).appendTo(jQuery('#mobile-sec-menu'));
});
});
</script>
<?php
}

This code is placed inside the functions.php file of the theme.
Thank you, it works :)

Leave a reply

Add codeAdd image