Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

redirect to registration page how exclude some pages? (2 posts)

Started 1 year, 6 months ago by: nickmy

  • Profile picture of nickmy nickmy said 1 year, 6 months ago:

    Hello
    thats my code:

    function restrict_access() {
    
    	global $bp, $bp_unfiltered_uri;
    
    	if (!is_user_logged_in() && (BP_REGISTER_SLUG != $bp->current_component  )) {
    
    		//bp_core_redirect( $bp->root_domain );
    		bp_core_redirect( $bp->root_domain . '/' . BP_REGISTER_SLUG );
    
    	}
    }
    
    add_action( 'wp', 'restrict_access', 3 );

    how can I exclude some pages. My sitemap,my terms of use page and my home page are also redirected I want to exclude them. Can someone help me please

  • Profile picture of nickmy nickmy said 1 year, 6 months ago:

    @hnla // @r-a-y maybe you can help???

    I know that I have to change something here :
    if (!is_user_logged_in() && (BP_REGISTER_SLUG != $bp->current_component )) {
    but I’m not that good with BP :S