Is it possible to show a menu item If only admin is logged in)
For any other user the menu item does not appear.
For example: if there are a few pages that have shortcodes or other functionality exampled to show how to build toggles etc, but only want the admin to be able to see them. These pages generally come with pre-built themes and show the admin how to build pages within the site.
By hiding the menu items, a series of pages can be “hidden” from a user but allow the admin to see them to be able to build pages, without having to remove them entirely from the site
😛 make sense?
Yes, it is possible.
You could use
wp_nav_menu_objects
orwp_nav_menu_items
hooks to add your filter function.You can also use this plugin: http://wordpress.org/plugins/menu-items-visibility-control/ (I haven’t tested it, so I’m not sure if it really works).