Making The Profiles Page Members Only

Themes Forums LoveStory WordPress Theme Making The Profiles Page Members Only

  • Author
    Posts
  • #41161

    ConnorMarc
    Member

    Hi,

    Is there a any way to make the “Profiles” page accessible to members and/or certain members only?

    I used the “Members” plugin, https://wordpress.org/plugins/members/, and was able to make the “Matchmaking” page members only, but not able to make the “Profiles” page.

    Is that forbidden? If not, please advise.

    Sincerely,
    Marc

    #41169
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #41187

    ConnorMarc
    Member

    Hi Again Themex,

    Sorry for the delay.

    No, I mean actually have that page NOT accessible to the public, or non-member. AKA only members can actually see that page, so they’ll see something like.

    “You must be a member to see this page” whenever they try to access the page I deemed to be the Profile page.

    If you go on the in-development website and visit this page: http://www.drjonline.net/matchmaking/ you will see what I mean.

    So, is this possible?

    #41203
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #41204

    ConnorMarc
    Member

    Hi again,

    Not sure what you call the profiles that sign up on the site, but is there another more appropriate name for them?

    What I want is that when someone visits the “Profiles” page, that they be asked to sign up first, once they sign up, and are logged in to the WordPress , then they can see all the profiles.

    Otherwise, anyone visiting the site can see everyone coming there to look for people to date. Right?

    #41218
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #41234

    ConnorMarc
    Member

    OK,

    First of all, thank you for your quick reply. Secondly, sorry for my delay, but I was dealing with other issues than the access, but now are pretty much resolved.

    I tried your first code…

    [CODE] – Didn’t work
    add_action(‘template_redirect’, ‘themex_redirect_users’);
    function themex_redirect_users() {
    if(!is_user_logged_in() && (is_page_template(‘template-profiles.php’) || themex_search())) {
    wp_redirect(ThemexCore::getURL(‘register’));
    exit();
    }
    }
    [/CODE]

    And got the following error message…

    [SNIPPET]
    Fatal error: Uncaught Error: Call to undefined function themex_search() in /home/maenws42/public_html/drjonline.net/wp-content/themes/lovestory/functions.php:46 Stack trace: #0 /home/maenws42/public_html/drjonline.net/wp-includes/class-wp-hook.php(298): themex_redirect_users(”) #1 /home/maenws42/public_html/drjonline.net/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #2 /home/maenws42/public_html/drjonline.net/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/maenws42/public_html/drjonline.net/wp-includes/template-loader.php(12): do_action(‘template_redire…’) #4 /home/maenws42/public_html/drjonline.net/wp-blog-header.php(19): require_once(‘/home/maenws42/…’) #5 /home/maenws42/public_html/drjonline.net/index.php(17): require(‘/home/maenws42/…’) #6 {main} thrown in /home/maenws42/public_html/drjonline.net/wp-content/themes/lovestory/functions.php on line 46
    [/SNIPETT]

    I then changed it to the following code…

    [CODE]
    add_action(‘template_redirect’, ‘themex_redirect_users’);
    function themex_redirect_users() {
    if(!is_user_logged_in() && (is_page_template(‘template-profiles.php’) || isset($_GET['s']))) {
    wp_redirect(ThemexCore::getURL(‘register’));
    exit();
    }
    }
    [/CODE]

    And that seemed to be OK.

    However, how do I implement it? I noticed you stated in that link to put the URL in the code. I don’t know where to place the URL in that code.

    I want to make two (2) pages members only…

    http://www.drjonline.net/matchmaking/ | which is coming from the BPMatch plugin I believe
    and
    http://www.drjonline.net/matchmaking/profiles/ | which is the profile functionality page

    So how do I implement that in the code you provided? Also, do I need to do anything else on the page(s) to implement the desired outcome of members only pages?

    Hopefully, you’re able to reply as quickly as you did last time.

    Sincerely,
    Marc

    P.S. – You still have access as I provided previously.

    #41257
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #41266

    ConnorMarc
    Member

    Hi Again,

    Thank you for your feedback.

    However, before you responded I was able to get the desired functionality by installing and setting up the “BuddyPress Members Only” plugin, which allowed me to set the visibility of all pages on the site.

    You might want to check it out: https://wordpress.org/plugins/buddypress-members-only/

    I also installed the “Match me for BuddyPress” plugin, which allowed me to have the members matchmaking percentages displayed. You can view it here: https://wordpress.org/plugins/match-me-for-buddypress/

    Question: Would you happen to know how to make the Users Profile Fields visible for members to display? I created a series of questions for the matchmaking, and it’s working, however, not able to get the members from your plugin to see the questions, only admins.

    Any advice?

    Again, you still have acess to my WordPress backend so you can see how everything is working. I invite you to check it out at your convenience.

    Thank you,
    Marc

    #41279
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

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

You must be logged in to reply to this topic.