Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Redirect on Logout


  • Venutius
    Moderator

    @venutius

    @danbp

    I inserted your code from here:

    https://buddypress.org/support/topic/error-404-page-not-found-3/

    However I am getting the following error:

    ct WordPress Logout to Home Page add_action( ‘wp_logout’, create_function( ”, ‘wp_redirect( home_url() ); exit();’ ) );
    Warning: Cannot modify header information – headers already sent by (output started at functions.php:87) in /homepages/14/d69811276/htdocs/clickandbuilds/BrigantesNation2147/wp-login.php on line 402

    Warning: Cannot modify header information – headers already sent by (output started at /functions.php:87) in /homepages/14/d69811276/htdocs/clickandbuilds/BrigantesNation2147/wp-login.php on line 415

    Would you have any idea why I am getting this error?

Viewing 4 replies - 1 through 4 (of 4 total)

  • Venutius
    Moderator

    @venutius

    Ah, My bad! I put it in outside of the PHP script. Sorted now


    danbp
    Participant

    @danbp

    Hi,

    the warnings cames probably because the logout function is called twice.
    Check your theme’s functions.php or see for a specific setting.

    Can you test the standard behave with a Twenty theme and BP, and all other plugins deactivated.
    Remove also the custom code while testing.

    If still an issue, consider this plugin. All is in the title, but it redirects to homepage on logout.


    Venutius
    Moderator

    @venutius

    It works now, thanks for your time and thanks for the code.


    danbp
    Participant

    @danbp

    You’re welcome 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Redirect on Logout’ is closed to new replies.
Skip to toolbar