Problem with mobile menu in Photographer theme

Latest Reply from Grace at 2016-08-26 03:10:33
Hi,
My client is using your great theme Photographer, but there is a one small problem. On mobile devices menu icons are not working/ showing. Can you tell us how to solve this problem please?
Here is the website: http://t7-consult.com/
Thanks in advance!
Hi!

To fix this issue you need to find the following code in the functions.php file:
function block_sec_menu_mobile() {
		?>
		<script>
			jQuery(document).ready(function(){
				jQuery('.menu-topmenu-container 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
	}
	function block_main_menu_mobile() {
		?>
		<script>
			jQuery(document).ready(function(){
				jQuery('.menu-primary li').each(function() {
					jQuery('<option />', {
					'value':jQuery(this).find('a').attr('href'),
					'text':jQuery(this).find('a').html()
					}).appendTo(jQuery('#mobile-main-menu'));
				});
			});
		</script>
		<?php
	}

And replace it with the next 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').text()
					}).appendTo(jQuery('#mobile-sec-menu'));
				});
			});
		</script>
		<?php
	}
	function block_main_menu_mobile() {
		?>
		<script>
			jQuery(document).ready(function(){
				jQuery('.menu-primary li').each(function() {
					jQuery('<option />', {
					'value':jQuery(this).find('a').attr('href'),
					'text':jQuery(this).find('a').text()
					}).appendTo(jQuery('#mobile-main-menu'));
				});
			});
		</script>
		<?php
	}

This file is loceted in the theme directory.

Leave a reply

Add codeAdd image