• plz add

    <link rel="shortcut icon" href="http://%some.domain.variable.here%/wp-admin/images/wp-logo-vs.png" />
    to admin-header.php so I don’t have to add it every time I update =)

Viewing 15 replies - 1 through 15 (of 21 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Create a plugin to do it. That way it won’t be changed by an upgrade.

    /*
    Plugin Name: Use WP Logo as Favicon
    Author: Otto
    Version: 1.0
    */
    add_action('wp_head','add_wp_favicon');
    function add_wp_favicon() {
    	echo '<link rel="shortcut icon" href="'.admin_url('/images/wp-logo-vs.png').'" />';
    }
    Thread Starter nakedczechs

    (@nakedczechs)

    I don’t like to add plugins unless I have to. mo plugins, mo problems

    something like this really shouldn’t need one either, just a simple entry that could be put in the .php

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Plugins don’t cause problems. Bad code causes problems. And no, your code will very likely not be put into the core, because other people use different favicons.

    Thread Starter nakedczechs

    (@nakedczechs)

    that’s the wordpress icon itself…I didn’t make some random icon for it

    A) Not everyone is going to want to use the wordpress logo for the favicon on their site.

    B) Why wouldn’t you just properly add your favicon code to your themes header, so it never gets overwritten?

    <link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />

    +1 on the user name, by the way. Gave me a chuckle…

    Thread Starter nakedczechs

    (@nakedczechs)

    I specified in the admin-header.php
    this is the icon that shows when you’re at/on the admin panel,
    not your site’s icon. I have a separate icon for that in the theme header file. (and that one get’s overwritten when updating the theme, of course =P)

    also…I’m not necessarily particular for having the EXACT icon I specified. it just seems the most appropriate. people who don’t want it can simply delete the referenced file, change the code, etc.
    right now there is no icon at all.

    my nickname isn’t random humor, it’s my website =)

    my nickname isn’t random humor, it’s my website =)

    …and yet I’m still amused. πŸ™‚

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I just put my favicon.ico file in the root of my website… Works fine. Why add anything?

    Thread Starter nakedczechs

    (@nakedczechs)

    it works fine for your website….or it works for admin panel?

    http://voodoopress.com/2011/02/customize-your-admin-area-with-a-logo-and-css-changes/

    That has info for adding in css to the admin panel. I would assume you could also add in your favicon the same way. It’s the same technique @otto recommended, swapping wp_head and admin_head really.

    Could be done through a plugin or directly in functions.php

    // ADD IN VOODOOPRESS ADMIN THEME
    add_action('admin_head', 'voodoo_admin_theme'); 
    
    function voodoo_admin_theme() { ?>
    <link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.ico" />
    <?php
    }

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    nakedczechs – Works for my whole site. favicon.ico in the root HTML and everything has my silly face πŸ™‚ Front end, admin and everything else.

    Thread Starter nakedczechs

    (@nakedczechs)

    this does not belong in the ‘how-to & Troubleshooting’
    I already knew how to achieve this
    it was a thread requesting a permanent solution / implementation from wordpress

    You can’t have a permanent core solution for a site specific feature.

    Thread Starter nakedczechs

    (@nakedczechs)

    it’s not a site specific feature
    it’s just an icon reference in the admin header

    It is site specific. Not everyone wants a WP favicon showing in the browser tab for their admin area.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘FavIcon’ is closed to new replies.