Skip to:
Content
Pages
Categories
Search
Top
Bottom

Log In / Log out Widget Redirection


  • coatedpill
    Participant

    @coatedpill

    Hello .

    I just want to know how can I redirect logging out users to the home page after logging out .

    ATM , when I try to log out using the widget , The page just still where you at ( user profile page )

    Just want to redirect users after logging out to homepage where ever page they are at to .

    Thanks .

    Warm Regards
    coatedpill

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    The logout link is created on ~Line 84 of this file:
    buddypress\bp-core\classes\class-bp-core-login-widget.php

    You need to change the bp_get_requested_url() to site_url()
    <a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>">

    However, hacking core files is not recommended.
    The proper approach is to create your own widget and make the changes in your widget.
    If you decide to write your own widget, also take a look at this file:
    buddypress\bp-core\bp-core-widgets.php

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar