This topic has 13 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #159050
     gibbywilson
    Participant

    Hi

    Can I hide the left menu for not logged in users?

    Thanks, Gibby

    #159207
     Laura
    Moderator

    Hello, it can be done with some custom codes, please try the following:
    1. Go to your website files using FTP or your hosting file manager
    2. Find wp-content/themes/buddyapp-child (you must have child theme installed and activated)
    3. Find functions.php and edit it
    4. Add the followng below */

    COPY CODE
    
    
    if( is_user_logged_in() ) {  } else {
    echo '
    <style>
    div#sidemenu-wrapper {
        display: none;
    }
    #page-wrapper {
        padding-left: 0px !important;
    }
    header#header {
        padding-left: 0px !important;
    }
    </style>
    ';
    }
    

    Let me know if that works 🙂

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #159218
     gibbywilson
    Participant

    Hello

    I added the above code to the bottom of the file and got errors

    Gibby

    Attachments:
    You must be logged in to view attached files.
    #159317
     gibbywilson
    Participant

    Hello

    thinking about it I also remembered that I would also like to see the option “Register” under the Log in option on the right menu for not registered users

    Thanks

    #159397
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #159494
     Radu
    Moderator

    Hi,

    Add this function instead the laura solutions

    COPY CODE
    
    
    function hide_sidemenu_guest() {
        if(!is_user_logged_in()) {
            ?>
            <style>
                div#sidemenu-wrapper {
                    display: none;
                }
    
                div#page-wrapper,#header {
                    padding: 0 !important;
                }
    
            </style>
    
            <?php
        }
    
    }
    
    add_action('wp_head', 'hide_sidemenu_guest');
    

    The code will be added to wp-content/themes/buddyapp-child/functions.php

    Cheers
    R.

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

    Hello

    Thanks for the fix but I can still see the menu icon and when I click it and see a blank panel

    Can this be completely removed?

    Thanks

    Gibby

    Attachments:
    You must be logged in to view attached files.
    #159548
     Radu
    Moderator

    Hi,

    The css code it works maybe do you have something cached?

    The image shows that the CSS provided by me has effect

    Try to check from incognito mode after you place the code in functions.

    Cheers
    R

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

    Hello

    Thanks for the support

    I would like to know how to add “register” to the right menu

    At the moment it only shows “login” for both desktop and mobile

    Thanks

    #159655
     Radu
    Moderator

    Hi
    You’re welcome

    Menu can be edited by adding or removing items to it from wp-admin -> appearance -> menus -> select the right menu

    See the next screenshot

    Cheers
    R.

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

    Hello

    I would like to add to this menu but I can’t see where in admin to do this

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #160261
     Radu
    Moderator

    Hi,

    You can edit that, by adding your custom items to that menu from wp-admin -> appearance -> menus ->
    But make sure to add the items to the Top Right Header Menu

    Cheers
    R.

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

    Hello

    I checked and there is no menu assigned for that place (check image)

    Do I use one of the existing menus or create a new one?

    Thanks

    Gibby

    Attachments:
    You must be logged in to view attached files.
    #160434
     Radu
    Moderator

    You have available that position!

    Just create a new menu and assign it to that position and that’s all

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?