Viewing 4 replies - 1 through 4 (of 4 total)
  • You can use this plugin, i am using this plugin for all login/logout redirects. it is working great https://www.ads-software.com/plugins/peters-login-redirect/

    Thread Starter elaxel84

    (@elaxel84)

    Yes, but if you are already logged in, should you can not see that you can log out, but can be passed directly.

    Thread Starter elaxel84

    (@elaxel84)

    if have a solution

    in header.php

    <?php
    
    	foreach(get_the_category() as $category) {
    		$project = strtolower($category->slug);
    	}
    
    	$wptitle = get_the_title();
    
    	if ( !is_user_logged_in() ) {
    //	echo '
    //	<a href="/register/" rel="nofollow">Register</a>
    //	?
    //	<a href="/login/" rel=nofollow>Login</a>';
    	} else if(is_user_logged_in() && $project != 'project' && $wptitle == 'login') {
    		echo '
    		<script type="text/javascript">
    		<!--
    		window.location = "'.get_bloginfo('url').'";
    		//–>
    		</script>
    		<!--<a href=”<?php //echo wp_logout_url( home_url() ); ?>” title=”Logout” rel=”nofollow”>Logout</a>-->';
    	}
    	?>

    Hi,

    Peter’s Login Redirect is a good plugin when you want to redirect the user but you can also use the redirect_url argument in the [wppb-login] shortcode to redirect the user after login.

    Best regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect URL after logged in’ is closed to new replies.