-
Author
-
July 26, 2014 at 14:24 #23698SplendorParticipant
Hi,
I have restricted access to different pages with memberships pro but I will like to hide my standard menu for non registered members. And leave the top menu for log in purposes. This will look better for visitor instead of getting a you must be registered and all the memberships available warning. Any type of plugin that works well with theme or custom code for doing this?
Please advice..
July 26, 2014 at 16:06 #23706KieranParticipanthttp://wordpress.org/plugins/nav-menu-roles/
Once installed go to menus, and in the main container for each drop down that you want hidden select ‘Logged in users’. This will then only show the container and sub items to users who are logged in.
July 27, 2014 at 13:15 #23741SplendorParticipantThank Keiran! I’m just trying to figure out how to hide the logo from logged out users in the front page where the standard menu is…
July 28, 2014 at 18:50 #23837CatalinModeratorHello,
The file where the header div can be found here:
..\wp-content\themes\kleo\page-parts\general-header-section.php
You need to copy this file in the child theme and modify it as follows:
replace this code (starts with line 100)
COPY CODE<a href="<?php echo home_url();?>"> <?php if ($logo_path != '') { ?> <img id="logo_img" title="<?php bloginfo('name'); ?>" src="<?php echo $logo_path; ?>" alt="<?php bloginfo('name'); ?>"> <?php } else { ?> <?php bloginfo('name'); ?> <?php } ?> </a>
with this code
COPY CODE<a href="<?php echo home_url();?>"> <?php if ($logo_path != ''&& is_user_logged_in()) { ?> <img id="logo_img" title="<?php bloginfo('name'); ?>" src="<?php echo $logo_path; ?>" alt="<?php bloginfo('name'); ?>"> <?php } ?> </a>
Let me know if this works.
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The topic ‘Hide menu for non registered members’ is closed to new replies.