Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Displays the registered WordPress Site Icon as a logo on the Login Form
<?php
/**
* Displays the registered Site Icon as a logo on the Login Form
*/
function fltnt_add_site_icon_to_login() {
if ( function_exists( 'has_site_icon' ) && has_site_icon() ) {
?>
<style type="text/css">
.login h1 a {
background-image: url(<?php site_icon_url(); ?>);
}
</style>
<?php
}
}
add_action( 'login_enqueue_scripts', 'fltnt_add_site_icon_to_login' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment