The admin_footer_text WordPress PHP filter allows you to customize the “Thank you” text displayed in the admin footer.
Usage
add_filter( 'admin_footer_text', 'your_custom_function_name' ); function your_custom_function_name( $text ) { // your custom code here return $text; }
Parameters
$text
(string) – The content that will be printed.
More information
See WordPress Developer Resources: admin_footer_text
Examples
Change the admin footer text
To change the admin footer text, replace the original text with your custom message.
add_filter( 'admin_footer_text', 'change_admin_footer_text' ); function change_admin_footer_text( $text ) { $text = 'Built with <strong>WordPress</strong> and love.'; return $text; }
Add a link to the admin footer
To add a link to the admin footer, append the HTML code to the existing content.
add_filter( 'admin_footer_text', 'add_link_to_admin_footer' ); function add_link_to_admin_footer( $text ) { $text .= ' | <a href="https://yourwebsite.com">Visit our website</a>'; return $text; }
Display the current user’s display name in the admin footer
To show the current user’s display name in the admin footer, retrieve the user information and add it to the existing content.
add_filter( 'admin_footer_text', 'add_user_name_to_admin_footer' ); function add_user_name_to_admin_footer( $text ) { $user = wp_get_current_user(); $text .= ' | Welcome, ' . $user->display_name . '!'; return $text; }
Add a dynamic date to the admin footer
To add the current date to the admin footer, get the date using the date()
function and append it to the existing content.
add_filter( 'admin_footer_text', 'add_date_to_admin_footer' ); function add_date_to_admin_footer( $text ) { $date = date('F j, Y'); $text .= ' | Today is ' . $date; return $text; }
Remove the admin footer text
To remove the admin footer text, return an empty string instead of the existing content.
add_filter( 'admin_footer_text', 'remove_admin_footer_text' ); function remove_admin_footer_text( $text ) { return ''; }