Hello, im sure there is a simple way to do this but i have not been able to find a post or instructions on this.
I would like to put my logo on the menu that slides out on the mobile version of the site. is this possible? could someone point me in the right direction pleaseeeeeee.. Thank you
Ed
Hey edster818,
Thank you for the inquiry.
The theme creates the mobile menu items dynamically based on the default menu, so you cannot just insert the logo image in a template. But it is still possible with a custom script.
Please try this snippet in the functions.php file.
// add logo image inside the mobile menu
function ava_custom_script_mod_logo_mobile()
{
?>
<script>
(function($) {
$(document).ready(function() {
var burger_wrap = $('.av-burger-menu-main a');
$(burger_wrap).on('avia_burger_list_created', function() {
setTimeout(() => {
$("<div class='av-mobile-logo'><img src='IMAGE URL HERE' /></div>").prependTo('#av-burger-menu-ul').addClass("mobile_social_bookmarks");
}, 150);
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_custom_script_mod_logo_mobile', 10000);
You can then use the av-mobile-logo class name or selector to adjust the style of the logo image.
.av-mobile-logo {
/* add styles here */
}
.av-mobile-logo img {
/* add styles here */
}
Best regards,
Ismael
Thank you!! worked perfect!!!!