multisite – I have problem with wp_redirect
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?