Ultimate Member Refresh Active Page
-
Version 2.0.39
Refresh active pages not returning to original page and always displays profile page.
A redirect works fine.
Have changed the role based login to Refresh Active Pages, and also the Login Form is set to Refresh Active Pages.
Have also tried setting one or the other — all combinations fail.Did find an older 2015 PHP, but uses the standard WP login screens instead of the UM pages. (doesn’t look best when added to the navigation menu).
// Add Login and Logout menu items to menu whose menu name (theme_location) is ‘primary’
// Redirects to current page after login/logout
add_filter( ‘wp_nav_menu_items’, ‘loginout_menu_link’, 10, 2 );
function loginout_menu_link( $items, $args ) {
if ($args->theme_location == ‘top-bar-r’) {
if (is_user_logged_in()) {
$items .= ‘<li class=”right”>Logout‘; // For logout
} else {
$items .= ‘<li class=”right”>Login‘; // For login
}
}
return $items;
}Navigation menu is simply pointed to the Login page where the UM shortcode is placed.
The topic ‘Ultimate Member Refresh Active Page’ is closed to new replies.