jknetdesign
Member
Posted 5 months ago #
I used this function to get the favicon in the admin(dasboard) but it doesn't show in the login (where you login).
function favicon4admin() {
echo '<link rel="Shortcut Icon" type="image/x-icon" href="http://gardengoddesses.org/wp-content/themes/acoustic_v102/images/favicon.ico" />';
}
add_action( 'admin_head', 'favicon4admin' );
pedrogas_g
Member
Posted 5 months ago #
Use login_head for add your favicon wp_login.php.
add_action( 'login_head', 'favicon4admin' );
jknetdesign
Member
Posted 5 months ago #
So do I use two add actions:
function favicon4admin() {
echo '<link rel="Shortcut Icon" type="image/x-icon" href="http://www.crhouseinc.com/wp-content/themes/crhouse/images/favicon.ico" />';
}
add_action( 'admin_head', 'favicon4admin' );
add_action( 'login_head', 'favicon4admin' );
or just use login_head instead of admin_head?
Is this because of the new WP? because it works on my older sites.
pedrogas_g
Member
Posted 5 months ago #
admin_head was removed for the wp_login,
I think you should be use the two for a better semantic, you can use another action as well, but try to keep separed the login of the admin is cleener
jknetdesign
Member
Posted 5 months ago #
Just to be clear could you paste the entire function you're suggesting please?
pedrogas_g
Member
Posted 5 months ago #
the easy way is this
add_action( 'wp_print_scripts', 'favicon4admin' );
A Happy New Year to you