Thread Starter
sezgee
(@sezgee)
Hi,
Using your great plugin again on another site. Is there a way to change the menu item to just LOGIN (or LOGOUT)? I tried adding this custom function through code snippets, but it didn’t do anything:
add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
function add_loginout_link( $items, $args ) {
if ( SwpmMemberUtils::is_member_logged_in() && $args->theme_location == 'primary') {
$items .= 'Logout';
}
elseif ($args->theme_location == 'primary') {
$items .= 'Login';
}
return $items;
}
Thanks,
Sez
-
This reply was modified 2 years, 4 months ago by
sezgee.
Hi, we currently have the following addon.
https://simple-membership-plugin.com/adding-mini-login-widget-sidebar-header-footer/
Let me know if this helps you in any way.
Kind regards.
Thread Starter
sezgee
(@sezgee)
Thanks, yeah, with the shortcode I can then customize the text with Loco Translate and CSS. Thank you!