• Resolved Beee

    (@beee)


    I have TML installed without the redirection module and I’m trying to redirect a user, after log out on the front-end.

    So I thought I would hook into tml_redirect_url, with the following code.

    <a href="<?php echo get_permalink ( $logout_page_id ); ?>">
        {{ __( 'Log out', 'sexdates' ) }}
    </a>

    $lougout_page_id is the page id of the log out page in each specific language (WPML is installed).

    It logs me out, but the redirect is not working.

    So I thought, maybe I should hook directly into logout_url, but that only works on the back-end, not on the front-end, which made me think something in the plugin is ‘blocking’ this.

    Does it ? I checked the docs but couldn’t find anything besides tml_redirect_url.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    You’ll want to use the logout_redirect filter. Here’s the filter’s signature:

    
    $redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
    
    Thread Starter Beee

    (@beee)

    Got it working, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Log out filters not working ?’ is closed to new replies.