Find the class or id of the menu item that you want to hide.
suppose the class of that menu is logged-in-menu
Then in header.php file of your theme before closing head tag use the below code
<style>
<?php if(! is_user_logged_in() ) : ?>
.logged-in-menu{
display: none;
}
<?php endif; ?>
</style>
Related Posts:
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Unregister Nav Menu from Child-Theme
- Display only page specific sub menu items using Custom Walker
- Pulling Featured Images in to a WordPress Menu
- wp_nav_menu always falls back to a menu
- Menu Disappears on Category Pages
- Overriding wp_nav_menu default arguments
- Move admin menu at the end
- Should the caching of WordPress menus be specific to each page?
- Not able to get current menu ID
- How to implement my own icons instead of using the svg icon system
- wp_nav_menu (secondary menu) not adding current classes
- WordPress wp_nav_menu with a nav tag
- How can I detect whether a BuddyPress page is active from within my theme?
- WP /wp-admin/admin-ajax.php produces 404
- `start_el` depth argument in custom nav walker always evaluates to zero
- Programmatically set current-menu-item using wp_nav_menu
- WordPress Split Menu
- Custom Admin Menu Order
- How to set classname for tag in wordpress menu?
- Get number of root elements in walker class
- Operable default menu *and* custom 3 menu
- HTML to WordPress Menu convert
- How to create this Custom Walker Menu
- create a 2 row menu in wordpress
- Get menu item by name or slug
- How to handle many different menus?
- Change sub-menu contents of main menu
- wp_page_menu not working right?
- using OOP approach to create plugin but stuck at making hyperlinks to work
- creating a custom walker class
- Adding existing links to custom navigation menus?
- How to truncate menu label in wordpress?
- Is it possible to add a dynamic link in the main navigation in a child theme
- How to change menu structure?
- magic “MENU” button under Twenty Twelve theme
- Remove first separator in wp_nav_menu
- wp_nav_menu check both hierarchy fail?
- Edit the (automatic) HTML layout of nav menus
- How to make wordpress nav menu use post custom meta data
- Add custom path to url to specific pages
- CTA button that is only visible to some of my users
- How do add a menu with levels within page [closed]
- Hide menu item when users are logged in/out
- add another html tag after li element in wp_nav_menu
- How do I change/remove styling (top border) on main menu for active page and hovering (Avada Theme)
- menu-item class missing on wordpress menu
- How to add scroll IDs to WordPress menu anchors
- Active class to current link
- Making pages in a menu appear conditionally
- Modify the output of wp_nav_menu in a very specific way?
- Display pictures instead of text in menus
- how to check if given page is active page
- how to set the link in wordpress such that on clicking it doesn’t open another page but go to the bottom of same page
- custom walker class for own menu?
- How to add social buttons like facebook and twitter in the footer of a theme?
- WordPress Menu – creating a fake link [closed]
- Add a menu metabox to post edit page
- Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection
- (Mobile) Hamburger menu disappeared from a page (only one)
- How to add an archive page to WordPress menus (nav_menu)?
- Add div content to my already existing menu
- Hiding menu on specific pages
- Add category label for appearance > menus items
- Custom items for Menus
- sidebar navigation problem with child pages not all display.?
- How to point menu to my homepage
- save_post() on Menu Save
- dot.com/car1 does work, but dot.com/transport/car1 doesn’t work
- code to add an extra selection to the menu editor
- WP pages content is missing in frontend
- update_post_meta breaking wp_update_nav_menu_item
- Active menu item state on all menu items
- Building a menu from a large number of pages?
- Dashicons not showed for admin menu
- How to select particular menu position in wordpress?
- Menus not visible in Appearance after being registered
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Cannot add home page url to menu with #
- Accidental reverse order of menu items in one menu
- Having an issue with wp_nav_menu displaying custom navigation
- Add dynamic content block to nav section generated by custom walker
- Customizing label/title output of admin nav_menu selecter
- Extend Individual Menu on Page Function to individual Submenue on Page Function?
- How do I remove a menu from a theme?
- Get first menu item of custom menu
- How can I modify wp_nav_menu with walker?
- menu items outside of blog
- Walker for menus
- Custom Menu based off custom header
- How to insert date in topNav
- Change sub-menu css class
- How to add an tag when a menu item is a dropdown(or has a sub-menu) [duplicate]
- Remove “Next Post” in nav_menu
- Adding an additional menu in WordPress
- How to display a submenu as a popup when clicking a button?
- Menu not Showing on Mobile or While the page is shrinked
- My Menu Disappears on my Custom Link Homepage on Mobile
- Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function
- How to change mobile menu (toggle) icon in WordPress – Full Site Editing?