Logging out to LogIn Page

Community Forums Forums General Discussion Logging out to LogIn Page

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  keystone 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22974

    keystone
    Participant
    Post count: 93

    Can anyone assist me with how to direct people logging out to the home page rather than the log in page…including where to find the specific code to change? Using Corporate Theme. Site is http://imcatas.com.au


    Keystone Internet Solutions – Your Web Development and Positioning Professionals.

    #23030

    Peter
    Participant
    Post count: 76

    Hi there.

    Adding this code to your child theme functions.php file should do the trick;

    [php]add_filter( ‘logout_url’, ‘custom_logout_url’ );
    function custom_logout_url( $logout_url ) {
    return add_query_arg( ‘redirect_to’, home_url(), $logout_url );
    }[/php]


    Website: petercoughlin.com
    Twitter: petercoughlin

    #23073

    keystone
    Participant
    Post count: 93

    Thanks Peter…much appreciated


    Keystone Internet Solutions – Your Web Development and Positioning Professionals.

    #23605

    keystone
    Participant
    Post count: 93

    Finally got around to getting this done…and it worked like  dream. Many thanks!


    Keystone Internet Solutions – Your Web Development and Positioning Professionals.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.