This topic has 4 replies, 3 voices, and was last updated 10 years by Splendor.

  • Author
  • #23698
     Splendor
    Participant

    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..

    #23706
     Kieran
    Participant

    http://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.

    #23741
     Splendor
    Participant

    Thank 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…

    #23837
     Catalin
    Moderator

    Hello,

    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,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #23850
     Splendor
    Participant

    Is seems to work correct. Thanks Catalin!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Hide menu for non registered members’ is closed to new replies.

Log in with your credentials

Forgot your details?