WordPress Membership Plugin
I would like to show a login logout in my menu. How can I do that?
I know the code below will get me the login/logout to WordPress but how to get it for SMWP?
Can I copy the code above into my header.php file? If so where at the end or somewhere in the middle?
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
function add_login_logout_link($items, $args) {
ob_start();
wp_loginout('index.php');
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= '<li>'. $loginoutlink .'</li>';
return $items;
}
Mailchimp does that. To my understanding its a step that cannot be disabled. They want to make sure you have permission to send that person emails. The receiver has to confirm that they give you permission by clicking that link in the email they receive from Mailchimp.
Mailchimp blows.