WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: BAW Login/Logout menu] Sidebar Widget Login/Logout and Redirect

[Resolved] [Plugin: BAW Login/Logout menu] Sidebar Widget Login/Logout and Redirect

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

    @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 ?

    M3
    Member

    @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=”http://…”] 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="http://berita-it-terkini.merdekait.com/?page_id=851"]
    | <a href="http://berita-it-terkini.merdekait.com/?page_id=853" >Join</a>

    Apologize for my poor English 🙂

    Thank you for your help.

    Plugin Author Julio Potier
    Participant

    @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 'http://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 ‘[Resolved] [Plugin: BAW Login/Logout menu] Sidebar Widget Login/Logout and Redirect’ is closed to new replies.