Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @xavi3r12

    Participant

    I have tried that it still returned the same error, however i have just noticed that if i delete my bp-custom.php everything works fine but my pages does not redirect users to there profile “if logged in” which was the purpose of the bp-custom.php file. This in the code in my bp-custom.php file

    <?php
    // hacks and mods will go here
    /* Redirects to profile upon login */
    add_action('login_form', 'redirect_after_login'); 
    function redirect_after_login() 
    {     
    global $redirect_to; 
    if   (!isset($_GET['redirect_to'])) 
    { 
    $redirect_to =   get_option('activity');
    //  sample-page = your page name after site_url
    } }
    
    function bp_help_redirect_to_profile(){
    global $bp;
    
    if( is_user_logged_in() && bp_is_front_page() )
    bp_core_redirect( get_option('home') . '/members/' . bp_core_get_username( bp_loggedin_user_id() ) . '/activity' );
    
    }
    
    add_action( 'get_header', 'bp_help_redirect_to_profile',1);
    
    add_action('wp_logout','go_home');
    function go_home(){
      wp_redirect( home_url() );
      exit();
    }
    
    add_action( 'bp_complete_signup', 'buddydev_redirect_after_signup' );
     
    function buddydev_redirect_after_signup() {
        
        $page = wp_redirect( get_option('siteurl') . '/profile' );
        
        
        bp_core_redirect( site_url( $page ) );
    }
    
    ?>

    So how do i fix this?? I need help Please

Viewing 1 replies (of 1 total)
Skip to toolbar