How can I get two "home pages," one for visitors and one for members?

I want to have two separate home pages on my website, rhtpoetry,com, one for visitors and another for members after they log in. I'm sure this is possible because it's what happens when I go to Siteground, my web host. First I get a page with, among several navigation options, a log-in option, and then I get a new page with a set of navigation buttons. I would think this is something commonly done in Membership 2 and Membership 2 Pro. I want the navigation options in the members-only home page to "carry over" into the destination posts or pages, as they do in the visitors' Start Page, so that members could still have the same navigation options as they did on the members' home page or could return to the members' home page, if they wish. My current theme is Experon, which seems to accommodate only one home page. Still, I presume what I want is possible. Am I right? How do I set it up?

Robert Thompson

  • Adam Czajczyk

    Hello Robert,

    I hope you're well today and thank you for your question!

    There's no such option like "two homepages" in WordPress and themes do not support that. This is done in a different way. Let me explain the general idea step by step:

    1. create your homepage, setup menus and content etc the way it should be visible "by default" (to the not-logged in users).

    2. create a regular WP page (on "Pages -> Add new") and put the content that you wish to make available to the "members only".

    3. on "Appearance -> Menus" create a new menu:

    - this menu should have all the same elements that the main menu has
    - plus all the additional items that should be available to members only
    - plus a link to the page that you created in step 2 that may e.g. be titled like "Members homepage" or similar
    - do not assign this menu to any location!

    4. Use Membership 2 Pro "Protection Rules" to protect the page that you created in step 2 with membership(s) so it would be available to members only; any non-member user attempting to visit that page would be greeted with a message that the page is protected and available to members only (along with a login form).

    5. Go to the "Membership 2 Pro -> Add-ons" page and activate the "Redirect Control" add-on

    6. Go to the "Membership 2 Pro -> Settings -> Redirect" page

    7. Put an URL (link) of the page that you created in step 2 into the "After login" field

    8. Put an URL of your site (bare URL, a homepage link) into the "After logout" filed

    9. Go to the "Membership 2 Pro -> Add-ons" page and enable the "Advanced menu protection" add-on.

    10. Click on "details" link in "Advanced menu protection" box on the same page

    11. Select "Replace individual Menus" from the drop-down list and close the box

    12. Go to the "Membership 2 -> Protection Rules -> Replace Menus" page

    13. On the list find the name of the menu that's currently set as a primary (main) menu of your site

    14. Hover mouse pointer over it and click on "Modify access" link that shows up next to it

    15. A membership list shows up so select your membership from that list

    16. Click on a "(no replacement)" box between menu name and membership label and on the list select the menu that you created in step 3.

    That's all. What would be happening now:

    - a visitor (not a member) loads your site
    - a standard homepage and a standard menu (the one that's set on "Appearance -> Menus" page as primary one) shows up

    - a visitor logs in as a member
    - she/he is redirected to that other "homepage" that you created in step 2 above
    - a menu is replaced with that other menu (members only) that you created in step 3 above
    + this menu contains additional link like "Members area" or "Member's homepage" or similar
    + (optionally) you can remove the standard homepage (link to homepage) from that menu to make sure that members are directed to the "members homepage".

    This should work the way you described in your question.

    Kind regards,
    Adam

  • Robert

    Hello Adam,

    Thank you for the very detailed instructions on how to set up two "home pages." Everything went just as you said it would, but when I got to Step 15 I didn't see a membership list (maybe because I have no members yet), but all I saw was "RHTPoetryMembers" preceded by a checkmark, then a green circle. In Step 16 when I clicked on the "no replacement" box the menu that I created in step 3 doesn't appear, but only two items are listed: "(No replacement)" and "Visitorshomepage" (which I created in Step 1). I'd send you screen shots, but don't know how except by email. However, I have granted to WPMU DEV access to the back end of my website, so you can, if need be, see the problem. Do I actually need to do anything more after Step 9? I believe I have redirected members to Memberhome right after Registration as well as after Log In, and Posts can only be accessed from Memberhome. It is Posts to which I mainly wish to restrict access to members only.

    Robert Thompson

    Robert Thompson

  • Adam Czajczyk

    Hello Robert!

    I think there must have been something (unintentionally of course!) missed "on the way" when you went through the steps I suggested or maybe I have missed some small but important step. I have re-read my guide once again and I can't thing of anything that I could skip but there's always a chance that I just didn't think of something that's obvious for me but may not be that obvious for you :slight_smile:

    It would be best if I could check your site directly and you mentioned that you already granted a support access. Unfortunately, I don't see it enabled so could you please try enabling it again? Please follow this guide:

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

    Let me know when you are ready with this please and I'll then access and review the site. I believe we'll make it work for you in no time :slight_smile:

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Robert!

    Yes, it's working now and I was able to access the site, thank you :slight_smile:

    I checked the site and it seems "so far so good" except you didn't create that additional menu that I mentioned in point 3.

    To do this, please login to your site and go to "Appearance -> Menus" and click on "Create a new menu":

    Make sure that you did not marked that new menu as "primary" and did not assigned it to any location. Put all the standard items there + items that should only be available to members and save it.

    Then get back to point 12 and proceed. Give it a try please and I think you should get it to work that way. In case you'd need more assistance, let me know :slight_smile:

    Best regards,
    Adam

  • Robert

    Hi Adam,

    You are the bringer of good news. I redid Step 3, then went to Step 12, and things are a little different now. At Step 15 I still don't see a membership list, but a checkmark, then a green circle, then "RHTPoetryMembers" (but maybe that's OK). Then, at Step 16, I find Memberhome, the menu I created in Step 3, ,along with Start Page, so I select Memberhome. But it is stated to be with access for "Everyone." Shouldn't it be for members only? It seems iIcould change it.

    Can I delete individual nav links from the Memberhome page? I don't think members would need to see the Sample Poem, or read the Introductory sales pitch, or see the Registration and Log In links again. Why did they need to be included in Step 3?

    Since I am the administrator, and can't log in because I'm already logged in, I can't go to the Memberhome page to see how everything works. By the way does WPMU DEV supply a Log In page? or does PayPal? Or do I write one?

    Again, many thanks for your great help. I am so eager to get this website on line!

    Robert Thompson

  • Adam Czajczyk

    Hello Robert!

    You are the bringer of good news. I redid Step 3, then went to Step 12, and things are a little different now. At Step 15 I still don't see a membership list, but a checkmark, then a green circle, then "RHTPoetryMembers" (but maybe that's OK). Then, at Step 16, I find Memberhome, the menu I created in Step 3, ,along with Start Page, so I select Memberhome. But it is stated to be with access for "Everyone." Shouldn't it be for members only? It seems iIcould change it.

    The "RHTPoetryMembers" is the name of your membership so that seems to be fine. The fact that the "Memberhome" manu was set to access for "everyone" doesn't really matter because it's not called anywhere on the site so it's not displayed anywhere (it's not available to anybody therefore).

    It is only loaded if a logged in member of "RHTPoetryMembers" membership is accessing the site. I checked your setup though and the way its configured currently will also work. To test it out I have assigned myself a membership "RHTPoetryMembers" and logged in to the site and it seems to me like it's all working fine now :slight_smile:

    Can I delete individual nav links from the Memberhome page? I don't think members would need to see the Sample Poem, or read the Introductory sales pitch, or see the Registration and Log In links again. Why did they need to be included in Step 3?

    Yes you can. You can edit both menus (the "Start page" menu and "Memberhome" menu) independently. It's completely up to you what menu items you put there.

    I suggested this way of creating menu because it was actually easier to explain and to follow. You may however make any changes to it you wish.

    Since I am the administrator, and can't log in because I'm already logged in, I can't go to the Memberhome page to see how everything works.

    You can actually :slight_smile: Just open the page that you wish to check and look for the "Test membership" button on the admin toolbar at the top of the screen. It puts you in a membership simulation mode and you can even select if you want to see the page as a "member" or a "visitor" etc.

    Please note: once you done with testing, make sure to disable the "Test Membership" mode so it wouldn't affect you work on the site.

    By the way does WPMU DEV supply a Log In page? or does PayPal? Or do I write one?

    I'm not quite sure if I follow you on this one :slight_smile: Can you please explain what do you mean?

    I think, when I click on "Post," in these Support sessions, that I should get an acknowledgment that the post was actually sent, just to make sure that my clicking on "Post" really registered.

    That sounds like an idea :slight_smile: Thanks for suggesting it. I'll pass that to our web developers for further consideration.

    Best regards,
    Adam

  • Robert

    Hello Adam,

    Your very prompt reply to my latest query is much appreciated. My question about who supplies the Log In page was dumb indeed; such a page exists, with the shortcode [ms-membership-login], so I presume it was part of the Membership 2 download.

    Now what I don't know is how a member logs out, although that may be a question for a separate ticket. I also don't know how to set up scheduled publication of posts, although I once stumbled onto a screen where this was an option, so I know it can be done in WordPress. Also, I wish to put a termination date on my posts, so they won't appear on the website after a given period of time, Finally, can I present a dynamically changing list of available archived posts, so that members can navigate to any one directly? I suppose there would have to be a navigation link (for members only) to the archive list. When these problems are solved, possibly by separate tickets, I think I will have all I want for my website. But you seem able to resolve all my difficulties.

    I found the "Test Membership" button for the protected pages, and then accidentally found, under "Quick Edit," that I was indeed in test mode and could exit from it; but when I went as a member to "Memberhome" I saw the text but no navigation links. As a visitor I saw no nav links in Start Page, either, but I know they're there. I would like to verify that Memberhome, as well as the members' intro page and the posts, have the proper links. Maybe I'll have to log in under an assumed name, to see what happens. Or is there a better way?

    Regards, and many thanks for helping me get this site in the internet in the way that I want it,

    Robert Thompson

  • Dimitris

    Hey there Robert,

    hope you're doing good and don't mind chiming in! It is preferable to open threads with single requests/issues as this will make the actual thread more helpful for future members and also helps us to better follow-up on topics and further assist, so yes, please keep that in mind in the future. :slight_smile:

    Now what I don't know is how a member logs out, although that may be a question for a separate ticket.

    This can done either through the "My account" page as set in Membership 2 -> Settings -> Membership 2 Pages

    or when the [ms-membership-login] shortcode is used

    I also don't know how to set up scheduled publication of posts, although I once stumbled onto a screen where this was an option, so I know it can be done in WordPress.

    Here's the official manual page about that
    https://make.wordpress.org/support/user-manual/content/posts/schedule-a-post/

    Also, I wish to put a termination date on my posts, so they won't appear on the website after a given period of time,

    "Post Expirator" plugin should do this trick :wink:
    https://wordpress.org/plugins/post-expirator/

    Finally, can I present a dynamically changing list of available archived posts, so that members can navigate to any one directly? I suppose there would have to be a navigation link (for members only) to the archive list.

    I presume you can use some widgets in sidebar locations for that. Here's couple of plugins which help you display posts.
    https://wordpress.org/plugins/ultimate-posts-widget/
    https://wordpress.org/plugins/recent-posts-widget-extended/
    https://wordpress.org/plugins/recent-posts-widget-with-thumbnails/
    Another path could be to create a custom page template for that, but this resolves to custom development which surpasses the scope of this support forum. You can advise our Jobs & Pros section for this kind of custom work though.

    Maybe I'll have to log in under an assumed name, to see what happens. Or is there a better way?

    "User Switching" plugin can become handy in situations like these, so you can test what a specific user experiences.
    https://wordpress.org/plugins/user-switching/

    Warm regards,
    Dimitris

  • Robert

    Hello Dimitris or WPMUDEV Support Team,

    I expected when members of rhtpoetry,com accessed the site and went to the Start Page, that they would have to log in with their User Name and Password to reach the members' area, from where they could access the current and recent posts. This is what I generally have to do to access restricted areas on other websites. But I see that the way rhtpoetry.com is set up that members go directly to the Start Page in the members-only area, from which they can access the Posts. How does the program know that it is a member who has gone to the Start Page? And isn't this easily subject to a hacker's attack? I think I would prefer it if a member went to the vistors' Start Page, logged in, and then got access to the Posts. Can this be set up?

    Robert Thompson

  • Dimitris

    Hello Robert,

    I expected when members of rhtpoetry,com accessed the site and went to the Start Page, that they would have to log in with their User Name and Password to reach the members' area, from where they could access the current and recent posts.

    This is what should be happening in your end also!

    I see that the way rhtpoetry.com is set up that members go directly to the Start Page in the members-only area, from which they can access the Posts.

    If I visit https://rhtpoetry.com/ (non logged-in) I have no access to your posts, I should log-in in order to see the alternative navigation menu.

    How does the program know that it is a member who has gone to the Start Page? And isn't this easily subject to a hacker's attack? I think I would prefer it if a member went to the vistors' Start Page, logged in, and then got access to the Posts. Can this be set up?

    This is work of Membership plugin as it sets protection rules in different membership levels and assigns users to them.

    I think I would prefer it if a member went to the vistors' Start Page, logged in, and then got access to the Posts. Can this be set up?

    The "Start Page" I see as non-logged-in user is the default homepage. Your members homepage (the one you redirect after log-in) is the one you used in steps #2 and #7 in Adam's first reply. You can change the content of these pages as you wish.

    In case I'm missing something here, please do correct me and further elaborate. Also, re-granting us with support access it would be perfect, so we could further examine your setup.
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/
    (support access is auto-expiring for security reasons)

    Warm regards,
    Dimitris

  • Robert

    Hello Dimitris,

    You seem to understand the problem quite well.

    I have granted a new access to rhtpoetry.com to WPMU DEV troubleshooters. I have also added the User-Switching plugin, so if you wish you can pretend to be Laura Corbett, who is my one and only paid member.

    Would it help to skip Adam's Step 7, or by some other means, to force the use of a special log in by members? Or will you tell me that that is totally unnecessary and nothing to worry about?

    Regards,

    Robert Thompson

  • Adam Czajczyk

    Hello Robert!

    I tried to access your site in order to check it again but it seems that the support access is not granted. Could you please take care of that? Just go to the "WPMU DEV -> Support" page and make sure that it's granted or if the page says it is - revoke it please and grant again.

    Would it help to skip Adam's Step 7, or by some other means, to force the use of a special log in by members? Or will you tell me that that is totally unnecessary and nothing to worry about?

    The only purpose of step 7 is to automatically direct members who logged in to their "dedicated homepage". You may skip that step and that won't break the site or its security. The only aspect that will change is that after logging in members will no longer be automatically taken to their "members only homepage".

    An example scenario if you skipped step 7 would be like this:

    - a visitor (not logged in member) visits your site
    - a default homepage is loaded
    - member goes to a login page
    - member logs in
    - member is taken to her/his account page

    In order to visit "their homepage" they would just have to use some menu item that would point to that page (e.g. you could add something like "members area" named link to the members-only menu).

    Best regards,
    Adam

  • Robert

    Hello Adam,

    Thanks for your quick reply.

    I thought I had granted permission for WPMU DEV analysts got access my site, rhtpoetry.com, but I must not have. So I've done it again, this time clicking Revoke access before allowing new access. I received this message: "Access active until 11:27 pm in 5 days." I hope now that all will work.

    I will fool around to see what I can do if I no longer direct members to my dedicated homepage, following the scenario you laid out.

    By the way, I plan to go live with my site at the very start of 2017. I could conceivably go live next month, in December, but think the timing just before the Christmas holiday would be poor. If you or your colleagues would be interested, you are invited to visit rhtrpoetry.com, read the introductory material, and maybe think of becoming a member.

    Best regards,

    Robert Thompson

  • Robert

    Hello Adam,

    I'm sorry to say that in "fooling around" I messed things up badly. As a result I tried to redo your Steps 1 through 16, but now my Start Page has the wrong links. It's as if every page listed in Step 3 (before being transferred to the menu listing) got transferred to the StartPageMenu list, and I don't know why. Probably I should have just left everything alone that was working OK, even though I was worried about the ease of being hacked. But I would like members to go to the Memberhome page, instead of having a "Start Page" from which automatically identified members could access the Posts, bypassing entirely the non-members' Start Page and the necessity of logging in with their username and password, and after logging in being redirected to Memberhome from where they would normally access the Posts.

  • Dimitris

    Hey there Robert,

    hope you're doing good today! :slight_smile:

    I just accessed your website and made couple of changes for we could "revert" to what had been accomplished so far with Adam's help.

    I had to set the default navigation menu to "StartPagemenu". This is used for the non-logged in users, so I also deleted the "Posts" link from that menu.

    So, to wrap this up, a visitor (non-logged in user) can see the default home page and the "StartPagemenu" items. Then, he can login from /log-in/ page and after doing so he redirects to "Memberhome" page and he sees the "MemberhomeMenu" instead.
    If you need to stop the redirect after loggin and keep the default functionality which redirects member to "My Account" page, simply delete the redirect URL under Membership 2 -> Settings -> Redirect and also disable the "Redirect Control" add-on from Membership 2 -> Add-ons.

    Warm regards,
    Dimitris

  • Robert

    Hello Dimitris,

    I'm glad that you were able to modify the menu items so they are closer to what I want. I would also like to remove Memberhome, Members' Intro , and Pronunciation from the menu list on the
    open-to everybody Start page, and add Posts to the menu items on the members' home page (The full menu list on the Memberhome page should be Memberhome Members' Intro Pronunciation Account Posts (5 items), and this menu list should also appear on the Members' Intro, Pronunciation, Account, and Post pages). Can all this be done? Members will now have to log in after pressing the Log In menu item and will then be redirected to the Memberhome page. (I think I know how to do the redirection.) I'm not totally clear on what happens right after Registration. I would prefer it if the new member went directly to Memberhome, but if it has to be Account that would be acceptable.

    Both you and Adam deserve a lot of praise for helping to solve my problems. Thank you very much.

    Robert Thompson

  • Adam Czajczyk

    Hello Robert!

    I must admit I'm getting a bit lost here :slight_smile: Can we please make sure that we are on the same side first? This is how it works currently (I'll describe my experience from user's point of view):

    1. I visit the site as a visitor (not a member, not a logged in user)
    2. I see the default homepage which is "open-to-everybody Start page"
    3. The menu includes only following items: Start Page, Introductory, SamplePoem, Registration, Log in; see screenshot below:

    4. I click on "Log in" menu item and I'm taken to the login page with a login form
    5. I log in and I'm immediately taken to the "Memberhome" page (which would be a "members-only start page).
    6. The menu contains following items: Start Page, Introductory, SamplePoem, Registration, Log in, Memberhome, Members Info, Pronuncation, Posts; see below:

    As I understand this, this seems to work pretty much the way we discussed before when you started this thread. I suppose some slight changes of menu items may be the goal here but as I mentioned, I got a bit lost (and I sincerely apologize for this!) so if you could please sum it all up for me, preferably in relation to my post and points above, that would be of great help :slight_smile:

    Best regards,
    Adam

  • Robert

    Hello Adam,

    I am awfully sorry that you feel you are getting lost. I certainly don't think so. It seems to me that everything you have done is exactly what I want members to experience. But the Memberhome page doesn't need the "Introductory," "Sample Poem," "Registration," and "Log In" nav links, so they could be deleted (but not from the open-to-everyone Start Page). It would be useful to add an "Account" link on the Memberhome page, and the "Posts" link is of course necessary. I could probably handle modifying the nav links in accordance with the instructions that you have already given me. I want the nav links to "carry over" to the destination pages and "Posts," but I think that happens by default.

    I really can't thank you enough, and Dimitris, too, for all your help. I believe we are "there" now, and this ticket could be declared as resolved. But I still can't log in, because I'm an administrator, and so I can't get to the Memberhome page to check on everything. My friend, the paid member whom I told you about, can get there and can be my surrogate. I didn't know how many points to give you, but 50 seemed like a good high number. Thanks again,

    Robert Thompson

  • Dimitris

    Hello Robert,

    hope you're doing good today! :slight_smile:

    Here you can find a beginners guide on how to edit your navigation menus. Just skip the creation and the "manage location" parts as your menus are already created and set.
    http://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/

    For more complete testing, you can either use the User Switching plugin or create a new testing member and assign him the membership levels you want. :wink:

    Warm regards,
    Dimitris

  • Robert

    Hello Dimitris,

    Thank you for directing me to the Beginner's Guide about navigation menus.

    I have installed the User Switching plugin, and have switched to my one and only (so far) paid member. he problem is I can't log in with her password because I don't know it. And aI can't log in myself because as administrator I'm already logged in, so I can't get a user's view of exactly what happens. But my paid member can do it for me, so that works out.

    I plan now (after your and Adam's help) to go online early next year--first posting January 3. I have invited Adam to check out the website, rhtpoetry.com, and possibly considering registering. You are likewise invited. I think all necessary information will be on the site.

    If your name were Dmitri I would guess you were Russian. But Dimitris--with an "s" at the end--
    is it Lithuanian or Latvian? Point of curiosity. Also are you located in Australia, or not?

    I gave both you and Adam 50 points for all your help. I seemed like a high number--I hope I'm right. You each certainly deserve a high number. Thank you again.

    Best regards,

    Robert Thompson

  • Adam Czajczyk

    Hello Robert!

    Thank you for your kind words and - I believe I can speak for Dimitris too - for a generous points donation. That wasn't necessary at all but knowing that we were able to help and that you appreciate our assistance is what adds meaning to our work! Thank you for that!

    Just to satisfy you curiosity: I think Dimitris wouldn't necessarily keep it secret - he's Greek. I'm Polish. Our colleagues here come from many different countries around the world and we are globally distributed company working from different locations and time zones. Australia is our "company home" where our headquarters are.

    That said, I consider this thread as resolved and I'm really happy we could help you achieve your goal. In case you had any further question or needed more assistance in future, just let us know here or - if it was an issue not relevant to this one - in a new forum thread and we'll be glad to work with you again.

    Have a great day!
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.