How to have a different favicon for each page (6 posts)

  1. javawpscript
    Posted 2 years ago #

    What i would like is to have specific favion's on each page. I have currently got All in one favicon installed.

  2. bcworkz
    Posted 2 years ago #

    I don't think it's practical to enhance the plugin to do this, it probably requires a different approach. What that is depends on how you define which icon goes with which page. I suggest creating a function that decides the correct icon based on query vars or template tags like is_home, is_search, is_archive, etc. or something even more specific if need be. It should be able to be determined somehow from query vars though. The function returns the correct URLs in the standard series of <link> tags for favicons. This function could be a callback to the 'wp_head' action, or you could call it directly from your theme's header template.

  3. javawpscript
    Posted 2 years ago #

    What do you mean by that bcworkz? I don't know how to do that...

  4. bcworkz
    Posted 2 years ago #

    If you can't find a plugin to do what you want and don't know how to code a solution yourself, you would need to hire someone that does. I am not offering my services, you can find help at:

    It shouldn't take too long for someone that knows what they are doing.

  5. javawpscript
    Posted 2 years ago #

    They say that you need to pay for that so I don't want to choose that option.

  6. paka
    Posted 2 years ago #


    I think it can be done with al little PHP coding, and using custom-fields.
    You can insert a custom field 'favicon', with the name of the file.
    Then you write a function 'getFavicon()', and bind it to the wp_head hook. In this function you can get the name by using

    $file = get_post_meta(id, 'favicon)

    This http://codex.wordpress.org/Custom_Fields
    and this http://codex.wordpress.org/Function_Reference/get_post_custom should give you some background information.
    I think it's easy, but ask if there are some problems


Topic Closed

This topic has been closed to new replies.

About this Topic