Navigation Menus in Membership 2

I want 2 "homepages," one for everybody and one for members only, each with its own navigation menu. The website's posts could only be accessed from the members-only home page. To access the members-only home page, members would have to log in. Adam Czajczyk and Dimitris showed me how this could be set up, but I can't reproduce their instructions. When I try, I get a nav menu that inludes all pages on the left side of the WP Appearances -> Menu screen, except that "Start Page" is deleted, "Home" is added, and "Posts" does not appear at all. Since many other websites are set up as I want mine to be, I'm sure it's possible, but what am I doing wrong?

  • James Morris

    Hello Robert,

    I hope you are well today.

    In order to help you better with your issue, would you please grant me access to your site?

    You can learn how to grant WPMU DEV Support Access at the following link:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please reply back here once you've enabled access so I will be notified.

    Best regards,

    James Morris

  • Robert

    Hello James Morris,

    Today (Thursday) I have granted access to WPMU DEV to my site, rhtpoetry.com. I'm told it's good for the next five days. Sorry for the delay, but something unexpected intervened. Now, though, I'm back, and champing at the bit to get this problem resolved. I''m hoping to be fully ready to go online at the start of 2017.

    What I really want is for everyone, unregistered visitors and already-registered members, to go to the same home page (I call it "Start Page") with a menu bar on top of the page like this:

    Start Page Introductory Sample Poem Registration Login

    Everyone has access to these menu items, which "carry over" when anyone clicks on "Introductory" or "Sample Poem," but not when they click on the links provided by Membership 2: "Registration" and "Log In." (Eventually I want to have buttons.) When they register, new registrants are redirected to a second, members-only "home page, which I call "Memberhome." It is necessary for registered members to click on "Log In," each time they visit the site. Upon logging in, they are redirected to "Memberhome." "Memberhome" has a menu bar at the top of the age like this:

    Start Page Account Memberhome Member's Intro Pronunciation Posts

    These menu items should "carry over" into "Member's Intro," "Pronunciation," and "Posts." I am trying to avoid sidebars on the site. My theme is Experon, which allows full-page presentation of my content (poems plus notes), but which only allows one static home page to be automatically generated. The "Posts" are the latest poems provided (to members only), plus previous poems accessed according to WordPress protocol.

    I believe it's possible for registered members, when they first access the website, to go directly to "Memberhome." For security reasons I would prefer that not to happen, but for members to have to sign in every time, but maybe that is being overly security-conscious. I realize that on other sites it is possible to save the password, which effectively bypasses the need for an explicitly password-based login.

    Anyway, I've given my thinking on what I want the website to allow as far was members' (and visitors') navigation is concerned. I hope I'm not asking for impossibilities. And I hope that I have clearly presented what I'm looking for.

    Regards,

    Robert Thompson

  • Robert

    Hi James Morris,

    I trust you are now able to access my website, rhtpoetry.com, as an administrator. I hope you'll be able to find a way to do what I want.

    It occurs to me that there may be a big problem in redirecting after Registration and Log In from Account to Memberhome. If a member wants to go to Account, he should not be redirected. Can we have redirection only under certain circumstances, and not others?

    I have installed a plugin that supposedly will log out any user if he is inactive for a certain amount of time (selectable in advance). Is there a way for a member to logout (not merely close). I understand he could do this by going to Account, where there is a logout option, but this seems to me awkward. (Likewise, from the Start Page one can log out by going to Log In, but this seems awkward and counterintuitive.) Does WPMU DEV offer a separate Logout command?

    Regards,

    Robert Thompson

  • James Morris

    Hello Robert,

    If you are unable to enable Support Staff Login via your WPMU DEV Dashboard, you likely have a plugin conflict. In order to better help you with your issue, would you grant me access to your site and server?

    Please visit the Contact page and complete the form with the following information:

    Select "I have a different question" from the drop-down box.

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - Admin login:
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference
    - any other relevant urls

    Best regards,

    James Morris

  • Robert

    Hi James Morris,

    I thought I was logged in to the correct WPMU DEV site to grant you access to the back end of my website, rhtpoetry.com. I did receive a message saying that the granting of access was accepted, and good for five days.

    Now I am told that you cannot obtain access. I'm sorry to say that I don't fully understand what to do next. I don't know how to visit the Contact page. I cannot find any WPMU DEV Support page with "Contact" on it, and can't get any dropdown boxes at all. I also would not know what to enter for "FTP credentials." Would that be for my web host, Siteground?

    Oh, dear. It sounds as if I have a terrible problem. I did add a new WP plugin, Idle User Logout,
    just before I tried to give you access to the site. Could that plugin be the cause of a conflict? Before that, all seemed the working well. If registered users now are directed directly to the "Memberhome" page, as was true before, I would now find that acceptable if not preferable. I would prefer it if logged out members were required to log in explicitly in order to gain access to the Posts. Maybe the acceptable solution would be available without your having to take control of my site? But I'm perfectly willing for you to do so.

    Robert Thompson

    Robert Thompson

  • James Morris

    Hello Robert,

    The page you would need to visit is https://premium.wpmudev.org/contact/ to send login credentials. The FTP access is not essential at this point as I believe the issue is configuration related. I'm afraid the most expedient solution in your situation would be to grant admin access to your site so we can review your settings and help you get things setup the way you're wanting.

    I hope this clarifies a bit.

    Best regards,

    James Morris

  • James Morris

    Hello Robert,

    I sincerely apologize for the delay in replying and any problems it may have caused you.

    It's taken a bit of testing and rereading your posts a few times to try to get a clear picture of what you're wanting to do, but I believe I have a solution.

    Your theme does not seem to play well with the Advanced Menu Protection add-on. This is because you "must" select the menu location for your menu otherwise a default menu displays. Since you were wanting to "swap" menus, this was quite problematic as you can only have 1 menu associated with a location at a time. See screenshot: https://monosnap.com/file/strmUcl0SxHO0r1kg7XX7409TJDYCR

    However, I've come up with a workaround that should accomplish what you're wanting to do.

    First, I changed the Advanced Menu Protection add-on to Protect Single Menu items. Screenshot: https://monosnap.com/file/f4v93uIjLejVxgKaFyz7mDyQy07PQj

    Next, I selected which menu items should be protected, thus not viewable unless a member of the defined membership. Screenshot: https://monosnap.com/file/BtpwfyNPacqgieRtbfJKfSAIaTaNxh

    Then, I installed Nav Menu Roles which allows you to hide menu items based on whether a user is logged in or not. This enables the ability to hide redundant links, like Registration, when a member is already logged in. Screenshot: https://monosnap.com/file/fkOvZTkmNzky4cSRC5pdBbAuRfGPL7

    Finally, I created a wpmujames test account, added it to a membership and tested what the menu looked like logged in and logged out. Here are the results:

    Logged out: https://monosnap.com/file/l7DGcCC0wDk8CxncyKSkr1IivuSCUG
    Logged in: https://monosnap.com/file/DtVfxGDnPUmIhfwwi1eRg9PptgbLLM

    Also, the redirection to the member's home page is working correctly.

    Of course, all of this can be tweaked a bit to polish the appearance, but the above setup should be able to accomplish what you're wanting.

    Let us know if you have any further questions, we'll be happy to help! :slight_smile:

    Best regards,

    James Morris

  • Robert

    Hello James Morris,

    It seems like you've done it. You're a genius! Thank you very much for the trouble you've taken to solve my problem. Would it have been easier if I had chosen a different theme? I chose Experon because I wanted a theme that would give me full-screen coverage, without forcing me to have a sidebar. There might have been better choices.

    I'm not sure I completely understand why you did what what you did in Step 4 (4th screenshot). I presume a "user" means a person who is registered but who may be logged out. I also suppose (haven't checked this out yet) that the nav menu bar carries over into "Posts," so that the reader of a poem can, if he wishes, navigate directly to "Pronunciation." That is certainly one of the things I want.

    If you can hide "Registration" as being superfluous for a logged-in user, can "Introductory," "Sample Poem," and even "Start Page" be hidden in the "Memberhome" screen for the same reason? I would like that--fewer distractions.

    Is there a problem if I try to redirect the user away from "Account" to "Memberhome" immediately after registering or logging in? Suppose a user wants to go to "Account"--would he always be directed away from it and never be able to get there?

    Finally, where does anyone go after logging out? Back to the home screen on their computer or hand-held device, with the browser still open, or to "Start Page"? I have installed a plugin that automatically logs out any user after, say, 10 minutes of idle time, but I don't know if he would still be accessing rhtpoetry.com.

    Best regards,

    Robert Thomposon

  • James Morris

    Hello Robert,

    I'm not sure I completely understand why you did what what you did in Step 4 (4th screenshot). I presume a "user" means a person who is registered but who may be logged out. I also suppose (haven't checked this out yet) that the nav menu bar carries over into "Posts," so that the reader of a poem can, if he wishes, navigate directly to "Pronunciation." That is certainly one of the things I want.

    User is someone who is actively logged in.

    Advanced Menu Protection in M2P controls whether a menu item is displayed whether they are a member of a specified membership or not.

    Nav Menu Roles controls whether a menu item is displayed depending on whether a user is logged in or not, and optionally, depending on what user role the logged in member is associated with (Administrator vs Subscriber for example)

    If you can hide "Registration" as being superfluous for a logged-in user, can "Introductory," "Sample Poem," and even "Start Page" be hidden in the "Memberhome" screen for the same reason? I would like that--fewer distractions.

    Neither of these control what menu links display on which pages. To do that would take custom coding a menu, which can get pretty complex pretty fast. Alternately, there is the Page Specific Menu Items plugin, but I have not tried that out before. It seems to allow controlling which menu items display on a per-page basis.

    Is there a problem if I try to redirect the user away from "Account" to "Memberhome" immediately after registering or logging in? Suppose a user wants to go to "Account"--would he always be directed away from it and never be able to get there?

    Shouldn't be a problem. The redirection just redirects to that page. It doesn't hide it. As long as the page access is granted in M2P and WordPress, they should be able to access any page you allow.

    Finally, where does anyone go after logging out? Back to the home screen on their computer or hand-held device, with the browser still open, or to "Start Page"? I have installed a plugin that automatically logs out any user after, say, 10 minutes of idle time, but I don't know if he would still be accessing rhtpoetry.com.

    Your redirect control in M2P defines where the user is redirected to after logout. Currently, you have this set to your site's homepage. See screenshot: https://monosnap.com/file/C7RyFFIIZyJfItz38NiHhZMxaWuIX3

    I hope that clarifies a bit. :slight_smile:

    Best regards,

    James Morris

  • Robert

    Hello James Morris,

    I think you have done all that is possible to resolve the problem I have with trying to establish two "home pages." I have installed the plugin you mentioned, "Page Specific Menu Items," and that seems to do the job I want, not in exactly the way I want, but close enough. I plan to go online with that in a few weeks, and possibly refine the website later. :grinning: I tried to give you 50 points for all your help, but don't know if I succeeded. Thank you for your efforts. I will mark this thread as resolved.

    By the way, you are invited to register at rhtpoetry.com. The information on what the site offers is all right there. Please feel free to tell your colleagues and friends about the website--everyone is invited to visit and register if they wish.

    Best regards,

    Robert Thompson

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.