Forum Replies Created
-
AuthorPosts
-
SixBetsAGameMember
I just went through the tedious process of deleting multiple customers generated through testing … one at a time! Is there no way to delete multiple customers at once?
SixBetsAGameMemberIs there any way to limit the use of this coupon to the first sign up only?
August 18, 2017 at 5:03 pm in reply to: Redirect after login & adding login/logout code to navigation #76251SixBetsAGameMember@wzp – That is exactly what I was looking for. Thank you.
@admin – I was able to alter my code to do just that after wzp showed me the function to use. Here is the latest code.
add_filter( 'wp_nav_menu_items', 'vm_add_footer_loginout', 10, 2 );
function vm_add_footer_loginout( $items, $args ) {
// Change theme_location as you please
if ( $args->theme_location != 'footerlinks' )
return $items;
if ( wp_emember_is_member_logged_in() ) {
$items .= '<li class="menu-item"><a href="'. site_url('/member-login/?emember_logout=true') .'">Log Out</a></li>';
} else {
$items .= '<li class="menu-item"><a href="'. site_url('/member-login/') .'">Log In</a></li>';
}
return $items;
}To provide an update regarding the other possible solution, it did not work even after altering it to use the digits associated with my plugin.
August 16, 2017 at 4:54 pm in reply to: Redirect after login & adding login/logout code to navigation #76248SixBetsAGameMemberHow did you reach that conclusion? The only way that wouldn’t work, is if your theme or another WP plugin is doing some kind of redirection of its own.
I manually created a WordPress user and, when I logged into the site from the login menu link, I was redirected to the wp-admin. When I altered WP eMember settings to not create a WordPress user account, the login redirect worked. The only plugins installed at this development are BackupBuddy, Extra Shortcodes for WP eStore, Genesis Visual Hooks Guide, TablePress, Widget Logic, WP eMember, WP eStore, and WP Payment Gateway Bundle. None of those provide alternate login redirection settings.
I had captured the code referenced in your link last night and planned to play with it this morning. Your link provides other details that look useful. I do wonder if that will work on a mobile device, though.
I’m still looking for a function reference. I would like to alter the code that I have in functions.php to check whether that member is logged in or not so the link text can change accordingly. In this code sample, the logic I’ve applied does just that.
if ( is_user_logged_in() ) {
$items .= '<li class="menu-item right">Log Out';
} else {
$items .= '<li class="menu-item right">Log In';
} -
AuthorPosts