Wordpress: Forcefully logout -
Wordpress: Forcefully logout -
when i'm changing password front end side profile alter functionality using "profile builder" plugin. manually add together logout functionality below :
<a href="<?php echo wp_logout_url(home_url()); ?>" title="logout">logout</a>
then asking confirmation wants logged out.
i don't want confirmation, because redirects wp-admin confimation.
any way forcefully logged out front end in wordpress.
you can activate plugin , add together next code functions.php
add_action( 'wp_logout', 'auto_redirect_after_logout' ); function auto_redirect_after_logout(){ wp_redirect( home_url() ); exit(); }
change link code to
<a href="<?php echo wp_logout_url(); ?>" title="logout">logout</a>
wordpress
Comments
Post a Comment