Support Forum › Forums › Mixxcazt – Creative Multipurpose WooCommerce Theme › Server error (403 error) › Reply To: Server error (403 error)
July 15, 2021 at 9:25 am
#2112
Hi again,
Please use this code, copy and paste into file functions.php ( child-theme), I can’t edit your file:
<?php
/**
* Theme functions and definitions.
*/
function mixxcazt_mobile_navigation() {
?>
<div class="mobile-nav-tabs">
<ul>
<?php if (isset(get_nav_menu_locations()['vertical'])) { ?>
<li class="mobile-tab-title mobile-categories-title" data-menu="categories">
<span><?php echo esc_html(get_term(get_nav_menu_locations()['vertical'], 'nav_menu')->name); ?></span>
</li>
<?php } ?>
<?php if (isset(get_nav_menu_locations()['handheld'])) { ?>
<li class="mobile-tab-title mobile-pages-title active" data-menu="pages">
<span><?php echo esc_html(get_term(get_nav_menu_locations()['handheld'], 'nav_menu')->name); ?></span>
</li>
<?php } ?>
</ul>
</div>
<nav class="mobile-menu-tab mobile-navigation mobile-pages-menu active" aria-label="<?php esc_html_e('Mobile Navigation', 'mixxcazt'); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'handheld',
'container_class' => 'handheld-navigation',
)
);
?>
</nav>
<nav class="mobile-menu-tab mobile-navigation-categories mobile-categories-menu" aria-label="<?php esc_html_e('Mobile Navigation', 'mixxcazt'); ?>">
<?php
$args = apply_filters('mixxcazt_nav_menu_args', [
'fallback_cb' => '__return_empty_string',
'theme_location' => 'vertical',
'container_class' => 'handheld-navigation',
]);
wp_nav_menu($args);
?>
</nav>
<?php
}