logout redirect

Posted in

Is there a way to redirect the affiliate after logging out on the affiliate-area page
I have been able to redirect the login back to the affiliate-area page and i have been able to change the link in the notifications section for login
all that is left to do is redirect on logout – if this can not be handled, then i will just remove the logout shortcut from the affiliates-area page.

I don’t like people seeing the defaul wp-login.php page, nor do i want them to have even limited assess to the wp dashboard.
Cleaning up these issues with your plugin would be a great enhancement.

3 Responses to logout redirect

  1. George August 25, 2016 at 3:11 pm #

    Hi Mandara,

    Please put this code in your child theme’s functions.php file.

    add_shortcode( 'affiliates_logout_redirect', 'custom_affiliates_logout_redirect' );

    /**
    * Renders a link to log out.
    *
    * @param array $atts
    * @param string $content not used
    * @return string rendered logout link or empty if not logged in
    */
    function custom_affiliates_logout_redirect( $atts, $content = null ) {
    extract( shortcode_atts( array( 'redirect_url' => '' ), $atts ) );
    if ( is_user_logged_in() ) {
    return '' . __( 'Log out', AFFILIATES_PLUGIN_DOMAIN ) . '';
    } else {
    return '';
    }
    }

    then you can use the shortcode in your Affiliate Area page.
    [affiliates_logout_redirect redirect_url=”http://the_url_to_redirect_after_logout/”]

    Cheers,
    George

  2. Mandara August 25, 2016 at 12:53 pm #

    well this Affiliates Utilities link looks like php code
    and just where / what plugin does it go in??

  3. George August 25, 2016 at 7:26 am #

    Hi Mandara,

    Please have a look at Antonio’s Affiliates Utilities and logout redirect.
    Hope this is what you are looking for.

    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share