Forum Replies Created
-
I see… I have Theme My Login plugin installed. Maybe it could be causing the problem? Thanks for your help @bphelp and @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?Unfortunately, yes 🙁
@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.
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.
It didn’t work. I tried placing the code both in functions.php and bp-custom.php 🙁
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.