WordPress.org

Support

Support » Plugins and Hacks » Hacks » How to have a different favicon for each page

How to have a different favicon for each page

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    What do you mean by that bcworkz? I don’t know how to do that…

    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:
    http://jobs.wordpress.net/
    http://directory.codepoet.com/

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

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

    Hello,

    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

    Greets
    Paka

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to have a different favicon for each page’ is closed to new replies.