how to hide Mobile Bottom Navbar for users not logged in
-
I want to hide the Mobile Bottom Navbar for users that are not logged in.
This would be for the mobile part of the store.
Hello,
Sorry to say but right now there is no option in Theme Settings available for that. It requires Customization and this is beyond our limitations and support policy scope.
Hope you can understand our limitations.
Best Regards.
Is it possible to achieve my purpose?
Can you tell me how to customize this?
Which part in the code that I have to make modifications?
I need to do this asap.
Can you please assist me?
Hello,
Add the code below to the functions.php file in your child theme:
add_action(
'init',
function () {
if ( ! is_user_logged_in() && has_action( 'wp_footer', 'woodmart_sticky_toolbar_template' ) ) {
remove_action( 'wp_footer', 'woodmart_sticky_toolbar_template' );
}
}
);
Clear the cache and recheck the issue.
Kind Regards