Viewing 5 replies - 1 through 5 (of 5 total)
  • Sorry, disregard. Wrong post.

    Though I am looking at your issue 🙂

    The plugin does not have that option but we can create a custom variable using a filter.

    Add this to your theme’s functions.php:

    function stay_on_current_page( $bool, $variable, $user )
    {
      if( 'current_page' == $variable )
      {
        return $_SERVER['HTTP_REFERER'];
      }
    }
    add_filter( 'rul_replace_variable', 'stay_on_current_page', 10, 3 );

    Then use this in the logout settings:

    [variable]current_page[/variable]

    I was mistaken. The plugin does have that option. Just use

    [variable]http_referer[/variable]

    in the logout settings.

    Thread Starter SWATH

    (@swath)

    Great! Thanks a lot Chris, that did the trick.

    Thread Starter SWATH

    (@swath)

    Excellent! That worked too so I can just removed that snippet of code.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to redirect back to current page after logout’ is closed to new replies.