multisite – I have problem with wp_redirect

Question

After creating a subdomain, I wish to redirect to the wp-admin. This is my code:

do_action('wu_new_blog', get_site_url($site_id));
wp_redirect($url);

If I add the do_action the subdomain created but not redirect if I remove the do_action it redirects but the subdomain is not created.

how can I fix this?

0
fuxia 2 years 2021-03-26T17:03:23-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse