Skip to:
Content
Pages
Categories
Search
Top
Bottom

Must log-in to see any page

  • @holgria

    Participant

    Hi, I installed buddypress and buddypress more privacy options. Basically got my site to where if you go to the url you can’t get in unless you’re registered and we have a passcode for people to register with. However, google has indexed my site so they’ve destroyed my “brick-wall”. you can still access /activity or whatever if google takes you to a site that isn’t the main page.

    Is there a code or plugin I can add to where if you’re not logged in you just get re-directed to the login page and do not see anything on the site?

    Please note: I already added metatags and a robots.txt file to try to stop google and search engines in general.

Viewing 5 replies - 1 through 5 (of 5 total)
  • @hnla

    Participant

    An earlier thread might work for you. Always run a quick search :)

    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/members-only-2/

    @andrea_r

    Participant

    “However, google has indexed my site “

    And login to the backend of your main blog, go to Settings -> Privacy and check the box so google doesn’t index your site.

    @holgria

    Participant

    The box for google to not index my site is checked and has been since installation.

    I ran a search I couldn’t find what I was looking for so I posted.

    I’m looking for more of a simple if not logged in, redirect type code/plugin/mod .
    I’m not looking for people to have to pay for the site.

    I think Ray’s post/mod on that page maybe what I’m looking for, but I pasted it into functions.php and just ended up with blank pages.

    I found this code on another forum:
    if (is_user_logged_in()){
    global $current_user;
    if ( ! isset($current_user) ) $current_user = wp_ get_current_user();
    ? >
    Link to Protected Content
    < ?
    } else {
    ? >
    <a href="” title=”Login”>Login to edit
    < ?
    }

    but it’s not working.

    @holgria

    Participant

    I really only need this function on the members page / activity page.

    @holgria

    Participant

    @hnla – you were right. I finally got it to work, thank you so much.
    https://wordpress.org/extend/plugins/registered-users-only-2/ hope this helps anyone, the instructions are there.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Must log-in to see any page’ is closed to new replies.
Skip to toolbar