Re: Problem with new registered users
Posted: Sat May 06, 2017 5:57 pm
you would like that the user is redirected to a custom page after confirmation on buddypress (or anther that use same filter).
The code you provide work fine on my test.
As documented, it may should be added into bp-custom.php file, do not know if work in this case with wp_w3all, but should also
https://codex.buddypress.org/themes/bp-custom-php/
by the way, i've instead try it adding on fly the code into wp_w3all.php file (think already suggested in another post)
so search for this code:
ADD immediately after:
change http://localhost/wp47/2017/03/12/hello-world/ with URL to your page.
you'll see this will work. So you was passing the value to be redirect to, in wrong way, because with direct link, it work fine.
The code should be applied into bp-custom.php file as above mentioned, to avoid it is deleted when updating wp_w3all plugin. So try the procedure, or remember to re-add the above working test, into your wp_w3all.php.
The code you provide work fine on my test.
As documented, it may should be added into bp-custom.php file, do not know if work in this case with wp_w3all, but should also
https://codex.buddypress.org/themes/bp-custom-php/
by the way, i've instead try it adding on fly the code into wp_w3all.php file (think already suggested in another post)
so search for this code:
Code: Select all
} // end PHPBB_INSTALLED
} // end not in admin
if ( defined('PHPBB_INSTALLED') ){
Code: Select all
add_action( 'bp_core_activated_user', 'wpse_70289_activated_user_redirect' );
function wpse_70289_activated_user_redirect() {
// $page = 'activation-reussie';//your page slug
bp_core_redirect( "http://localhost/wp47/2017/03/12/hello-world/" );
}
you'll see this will work. So you was passing the value to be redirect to, in wrong way, because with direct link, it work fine.
The code should be applied into bp-custom.php file as above mentioned, to avoid it is deleted when updating wp_w3all plugin. So try the procedure, or remember to re-add the above working test, into your wp_w3all.php.