If the user is not login in to WordPress And redirects to another page.
<?php
if(!is_user_logged_in()) {
wp_redirect( site_url().'/login' );
}
?>
<a href="<?php echo wp_logout_url(site_url().'/login'); ?>">Logout</a>
We provide knowledgeable blogs related to php, jQuery, html, css, wordpress, woocommerce, cordova app with examples in 2021.
If the user is not login in to WordPress And redirects to another page.
<?php
if(!is_user_logged_in()) {
wp_redirect( site_url().'/login' );
}
?>
<a href="<?php echo wp_logout_url(site_url().'/login'); ?>">Logout</a>
Comments
Post a Comment