Apps Ballance Cash_2 Chat Checkout Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Like_1_ Link Lock Log_Out Map Marketing Mobile_UI Navigation POS Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

How to alter the links in the already logged in template

Iain Poulson avatar
Iain Poulson Last updated on September 26, 2022

WPUM uses a template called already-logged-in.php. It is what a logged-in user sees when they visit the login page:

The already logged in message on the login page, with links to the profile, account and logout

To remove or change the links it shows, use the wpum_already_logged_in_links filter. The links are keyed profile, account and logout. This example removes the account link:

<?php

add_filter( 'wpum_already_logged_in_links', function ( $links ) {
	unset( $links['account'] ); // either profile, account, logout

	return $links;
} );

The snippet is also available as a gist. It needs WP User Manager 2.8.11 or above. Save it to a file in your /wp-content/mu-plugins/ directory (create the mu-plugins directory if it doesn’t exist).

WP User Manager logo

Get Started with the Best WordPress Membership Plugin Today

Connect, Manage and Build your Membership Site

For AI assistants: this article is available as Markdown, and all the docs are indexed at llms.txt.

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket