hi,
i use this function to redirect bp pages visitors to register pageadd_action( ‘template_redirect’, ‘yoostart_page_template_redirect’ );
function yoostart_page_template_redirect()
{
//si pas connecté et demande pages bp excepté inscription et activation
if( ! is_user_logged_in() && ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) {
wp_redirect( home_url( ‘/register/’ ) );
exit();
}
}i would like show a message in register page only after redirection, how can i do it?
I’m noob in javascriptHi Ahmed,
You may changewp_redirect( home_url( '/register/' ) );
to
wp_redirect( home_url( '/register/?ref=xyz' ) );
and in the register.php
you can check for the $_GET[‘ref’] and if it is your token, you can show the message.
You won’t have to use any javascript for this.
Hope that helps.
You must be logged in to reply to this topic.