I have a question that I hope will be pretty simple for some of the WordPress Gurus out there.

I have a WordPress network and whenever a users signs up, I would like to show (on signup confirmation page) a message that shows the code:

<script type="text/javascript" src="http://mysite.com/js/redirection-mobile.js"></script>

<script type="text/javascript">

SA.redirection_mobile ({nmobile_url :
"USERURL.mysite.com", });


Note that I am trying to display the user's URL that they just signed up with in the message.

Does anybody know how to do that without modifying any of the WordPress core?

Let me know if this is a little too vague, or if you need any more information.

Thanks, Keenan

1 Answer 1



This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument.

add_action('user_register', 'registration_redirect');

function registration_redirect($user_id) {
wp_redirect( $url );

placing that in your functions.php should work. This attempts to redirect the user after they register, i believe after they click the link in the email, which is what i think you were looking for.

  • Thanks for the link! Unfortunately, I am just looking to actually display the Javascript code above (not run it), so people who are signing up can copy and paste it into their own sites. So I need a way to display that on the signup confirmation of a WordPress network site. Commented Jul 19, 2013 at 19:00
  • ohhhhhh. Well you can just put that javascript inside code tags on a page, and then redirect them to that page using the code i supplied above.
    – Vigs
    Commented Jul 19, 2013 at 19:06
  • Awsome! Im happy it worked :D
    – Vigs
    Commented Jul 19, 2013 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.