WordPress.org

Ready to get started?Download WordPress

Forums

Updating WP overwrite Favicon (15 posts)

  1. steveonz
    Member
    Posted 1 year ago #

    Hi,

    I seem to be having an issue with the Favicon being updated whenever wordpress updates. Is there a way I can ban the application from touching my Favicon files?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    What theme are you using?

  3. rahulrakesh1980ni
    Member
    Posted 1 year ago #

    Create the favicon icon and put it to the images directory of your wordpress theme and then open function.php file of wordpress and put the code given below.

    <?php
    function favicon_icon() {
    echo ‘<link type="image/x-icon" rel="shortcut icon" href="’.get_bloginfo("stylesheet_directory").’/images/favicon.ico" />’."\n";
    }
    add_action(‘wp_head’, ‘ favicon_icon’);
    ?>

    Be sure to name the favicon icon as "favicon.ico"

    Hope it will work.

    [This is not the place to promote your personal site]

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    then open function.php file

    No! This is the kind of change you would add via a child theme.

  5. steveonz
    Member
    Posted 1 year ago #

    I am using a theme called Blade.

    I have already uploaded the favicon in the root directory, and thanks for letting me know about the functions. However when I update wordpress next time, I will loose the changes to the functions file and it will overwrite my favicon; I will be in this state again soon :(

  6. steveonz
    Member
    Posted 1 year ago #

    Would that stop google and ie from downloading my Favicon from the root directory?

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    WordPress updates will not touch the functions.php file in your commercial theme. However, as you are using a commercial theme, you need to seek theme-specific support from the theme's vendors.
    http://themeforest.net/user/AzureThemes

  8. steveonz
    Member
    Posted 1 year ago #

    I see, so the functions in the theme, thanks.

  9. steveonz
    Member
    Posted 1 year ago #

    My issue was about wordpress updating the favicon in the root directory, google downloads this favicon and I want it to use the site's one.

  10. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    WordPress will not touch your favicon image.

  11. steveonz
    Member
    Posted 1 year ago #

    They have, when I go to my root directory it's now displaying the wordpress favicon.

  12. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    That's nothing to do with WordPress. There isn't even a favicon image in the core WordPress download. Check it yourself and see: download link

  13. rahulrakesh1980ni
    Member
    Posted 1 year ago #

    It will be better to use the function.php to add favicon to your site. In that state will not download your root favicon icon and will be done.

  14. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    It will be better to use the function.php to add favicon to your site.

    I seriously doubt many people want to create a child theme just to add a favicon to their site.

  15. steveonz
    Member
    Posted 1 year ago #

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic