Replies: 1 comment
-
Hello,
this seems to be a 3rd party plugin. WordPress itself has no condition settings. So, I can't tell you what is wrong there. But you can do this with simple code as well. 2 ways: PHP
Lines 59 to 70 in abdb20a
<!-- Bootstrap 5 Nav Walker Footer Menu -->
<?php
if ( is_user_logged_in() ) {
wp_nav_menu(array(
'theme_location' => 'footer-menu',
'container' => false,
'menu_class' => '',
'fallback_cb' => '__return_false',
'items_wrap' => '<ul id="footer-menu" class="nav %2$s">%3$s</ul>',
'depth' => 1,
'walker' => new bootstrap_5_wp_nav_menu_walker()
));
}
?> CSSIf you do not want to go the PHP way, simply use the #footer-menu {
display: none;
}
.logged-in #footer-menu {
display: flex;
} Both methods leads into the same result, footer-menu is hidden for not logged in visitors. Of course, PHP version is cleaner. Solved? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm hoping you can help.
bootscore 5.3.3
bootscore child 5.3.3
wordpress 6.3.1
I have created a menu that is for logged in users only, however, when I log out, the menu still shows. It doesn't matter if I add the menu to a widget, or just assign it to the footer-menu location, it still shows after logging out. Cleared cached many times, still showing.
I use the bootscore child theme, but changed it to bootscore main to test, and the menu still shows. I then changed to the twenty twenty-three theme, and it works correctly, the menu does not show.
I made the menu available to logged in users:
Appearance > Menus > Manage Locations > Footer menu > Selected the menu and then clicked + Conditions
General tab checked User Logged In, User Roles tab checked Administrator and Editor and SAVE
Can you help me to get this to work correctly?
Beta Was this translation helpful? Give feedback.
All reactions