Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • tatakatte
    Participant

    @tatakatte

    I see… I have Theme My Login plugin installed. Maybe it could be causing the problem? Thanks for your help @bphelp and @henrywright! 😀


    tatakatte
    Participant

    @tatakatte

    @henrywright

    This one worked well. Now, it’s redirecting to /stream/!

    function my_login_redirect() {
        if ( is_user_logged_in() && bp_is_register_page() )
            bp_core_redirect( home_url() . '/stream/' );
    }
    add_action( 'template_redirect', 'my_login_redirect', 1 );


    @bphelp
    I’m not really sure why it required priority to work, maybe due to a plugin that I’m using?


    tatakatte
    Participant

    @tatakatte

    Unfortunately, yes 🙁


    tatakatte
    Participant

    @tatakatte

    @Here’s everything that I have in my functions.php

    <?php
    /**
     * @package WordPress
     * @subpackage
     * @author
     * @since 1.0
     */
    
    /**
     * Child Theme Functions
     * Add custom code below
    */ 
    
    function my_login_redirect() {
        if ( is_user_logged_in() && bp_is_register_page() )
            bp_core_redirect( home_url() . '/stream/' );
    }
    add_action( 'template_redirect', 'my_login_redirect' );

    As for @bphelp’s, the slug is really /stream/. I checked it after reading your reply, but it really is /stream/. Also shouldn’t it return a 404-error if it’s a non-existent page? Please correct me if my understanding is wrong.


    tatakatte
    Participant

    @tatakatte

    Nothing happened. It’s still redirecting to /members/. I’m not really sure how I should put the opening and closing tags that @bphelp mentioned, but I just used /** and */ before and after the code you gave me.


    tatakatte
    Participant

    @tatakatte

    It didn’t work. I tried placing the code both in functions.php and bp-custom.php 🙁


    tatakatte
    Participant

    @tatakatte

    Hi @henrywright

    I tried this little code but my site gave me this error

    Warning: Cannot modify header information - headers already sent by (output started at /home/emncrz/public_html/wp-content/plugins/bp-custom.php:9) in /home/emncrz/public_html/wp-includes/pluggable.php on line 1178

    I’m not really sure how this pluggable.php works. Sorry for being such a noob.

Viewing 7 replies - 1 through 7 (of 7 total)
Skip to toolbar