• I have a multisite set up and have created a log out page, with the code

    wp_logout();
    wp_redirect( get_home_url() );

    The intention of this is to log the user out, then redirect them to the homepage of whichever multisite they are current on.

    However it logs them out and redirects to the main site homepage.

    Is this expected for my code, can anyone suggest something more suitable?

    Thanks

Viewing 1 replies (of 1 total)
  • try this instead:

    
    wp_redirect( home_url() );
    

    OR

    
    wp_redirect( bloginfo('url'));
    

    Either of the above snippets should work.
    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite log out and redirect to subsite homepage’ is closed to new replies.