Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide pages/content


  • flamuren
    Participant

    @flamuren

    Hi,

    I am building a membersite using buddypress, bbpress and package it with buddyx theme.

    If I visit as non-logged in I can see activites, forums, member etc. Is it possible to somehow block that? Perhaps re-direct to a login/register page as facebook does?

    Best regards,

    flamuren

Viewing 8 replies - 1 through 8 (of 8 total)

  • Venutius
    Moderator

    @venutius

    Here’s a plugin you could try, there’s a quite a few that will hide/redirect access requests to the signup page so you may want to do some research.

    BuddyPress Members Only


    flamuren
    Participant

    @flamuren

    Thanks alot Venutius. Except for the bad reviews on that plugin it seems to be a good fit to try.

    I will try to keep on google and look in the support forum, to do some more research as you propouse.

    If anyone else have anything to recommend I am all ears 🙏


    flamuren
    Participant

    @flamuren


    Anonymous User 18187419
    Inactive

    @anonymized-18187419

    This might work for you, it will restrict non-loggedin from accessing user profiles & members page.
    Change the redirect URL as appropriate.

    
    function michael_bp_not_loggedin_redirect() {
         global $bp;
         if ( is_buddypress() or bp_is_user() ) {
         if ( !is_user_logged_in() and !bp_is_register_page() and !bp_is_activation_page() ) {
          wp_redirect('https://yourwebsite/wp-login.php');
          exit;
          }
          }
    }
    add_filter( 'get_header' , 'michael_bp_not_loggedin_redirect',1 );
    
    

    If you also want to restrict bbpress, then change the third line to:

    
    if ( is_buddypress() or bp_is_user() or is_bbpress() ) {
    

    flamuren
    Participant

    @flamuren

    Thanks for the code tip.

    I also got this recommended for me: https://wordpress.org/plugins/lock-my-bp

    I think with all these tips and plugins etc I will try some out and evaluate. I will try to remember to update this thread on what solution I go with and how it works.


    shanebp
    Moderator

    @shanebp


    flamuren
    Participant

    @flamuren

    A quick update for others that are looking to do this.

    I choose https://wordpress.org/plugins/lock-my-bp

    Works great, easy to use and is 100% free. The only small issue as of now is a slight issue that the blog articales can be shown as not logged in – even if the blog page is locked. Hopefully the plugin creator will see this and make it work. But its a small issue really. Love the plugin.


    locker17
    Participant

    @locker17

    I had the same issue. But the plugin you recon does not work with BP 12.X (without Classic Theme). It was last updated 8 months ago. So I chose the BuddyPress Members only plugin which does the job.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar