Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Julio Potier

    (@juliobox)

    Hi

    FAQ :
    “The 4 shortcodes are “[login]”, “[logout]”, “[loginout]” and “[register]”. You can set 2 parameters, named “redirect”

    So
    [loginout redirect=”/page.php”]

    Is it what you want ?

    Thread Starter M3

    (@musadiqmarhaban)

    Hi,

    Sorry to trouble you again, I have a custom login page to login and logout into my site, so I try using the [loginout redirect=”https://…”%5D which you advise me.

    After I try the code, the login didn’t work, because it didn’t redirect me to my custom login page and instead to the standard wordpress login page. But after I signed in, the logout code works and it redirect me to my custom login page.

    Simply to say, I want people to login to my custom login page, and when logout, they will also be redirected to the same custom login page.

    At the present, this is the code I’m using in my HTML sidewidget:

    [loginout redirect="https://berita-it-terkini.merdekait.com/?page_id=851"]
    | <a href="https://berita-it-terkini.merdekait.com/?page_id=853" >Join</a>

    Apologize for my poor English ??

    Thank you for your help.

    Plugin Author Julio Potier

    (@juliobox)

    You are confusing the redirect and the login url.
    So, you need to hook the wp_login_url() function like this :

    function baw_login_url( $login_url, $redirect )
    {
    	return 'https://berita-it-terkini.merdekait.com/?page_id=851&redirect_to=' . urlencode( $redirect );
    }
    add_filter( 'login_url', 'baw_login_url', 10, 2 );

    Ok ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: BAW Login/Logout menu] Sidebar Widget Login/Logout and Redirect’ is closed to new replies.