This topic has 3 replies, 2 voices, and was last updated 6 years by Kieran_SQ.

  • Author
  • #200398
     ChristelijkPodium
    Participant

    Hi! On my website: http://christelijk-podium.nl I want registered users to have My Courses and My Membership in their Account Menu. But I want them hidden from unregistered users.

    How can I hide these menu items or hide the entire My Account menu item from the main menu?

    #200400
     Kieran_SQ
    Moderator

    Hi,

    To do this you will need to install a third party plugin that handles conditional menus. Personally I use Menu Item Visibility Control which can be installed for free from the WordPress plugin repository.

    https://wordpress.org/plugins/menu-items-visibility-control/

    If you install this plugin it will add a new field to each item that is within the menu titled ‘Visibility’ where you can enter PHP conditionals and functions.

    You can use the below to restrict certain menus to only logged in users or only logged out users

    Show only if the user is logged in
    is_user_logged_in()

    Show only if the user is logged out
    !is_user_logged_in()

    There are obviously many thousands more ways to use this but this will suit the situation you have described.

    Thanks,

    Kieran

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

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

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    Attachments:
    You must be logged in to view attached files.
    #200420
     ChristelijkPodium
    Participant

    Awesome! Thank you! Works great!

    #200422
     Kieran_SQ
    Moderator

    Hi,

    Great! Feel free to open a new ticket any time, and we’ll be happy to help 🙂

    Thanks,

    Kieran

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

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

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?