transmitstudio
6/4/2018 - 8:44 PM

login shortcode

// Add login shortcode
function xmit_login() {
<?php if (! is_user_logged_in()) : ?>
    <a href="<?php echo wp_logout_url(get_permalink()); ?>">Login</a>
<?php endif;?>
}
add_shortcode( 'login_link', 'xmit_login' );