Created
April 1, 2019 08:03
-
-
Save Glinkfr/71512fdeb8e3c0015c567564a1b65f71 to your computer and use it in GitHub Desktop.
Personnalisation de la page wp-login sans plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Personnalisation de la page wp-login | |
*/ | |
/* Fonction pour changer le lien du logo */ | |
function wpc_url_login(){ | |
return "https://glink.fr/"; // votre URL ici | |
} | |
add_filter('login_headerurl', 'wpc_url_login'); | |
/* Ajout du fichier css personnalise et d'une favicon pour la page login */ | |
function custom_login_head(){ | |
echo '<link rel="stylesheet" href="' . get_bloginfo('stylesheet_directory') . '/admin.css" type="text/css" media="all">'; | |
} | |
function new_favicon() { | |
$favicon_url = get_stylesheet_directory_uri() . '/images/favicon.ico'; | |
echo '<link rel="shortcut icon" href="' . $favicon_url . '">'; | |
} | |
# maintenant on ajoute les fonctions sur la page de login | |
add_action('login_head', 'new_favicon'); | |
add_action( 'login_head', 'custom_login_head' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment