Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the Favicon

  • Avatar of xeomueller
    xeomueller
    Participant

    @xeomueller

    How can I change the favicon of BuddyPress?

    To options: in the css file or I change the ico file. But I dont find nothing of them :(

    Please help me :)

Viewing 20 replies - 1 through 20 (of 20 total)
  • Avatar of Shelley Keith
    Shelley Keith
    Participant

    @bloom

    You can upload a new favicon.ico to replace the one that comes with the theme OR you can edit the header.php file to point to a new favicon.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Place this link tag in the header file of your home theme and member theme.

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

    The above is just an example. Make sure the path to your favicon is correct.

    If you don’t have a favicon, here’s a site that makes a favicon out of any graphic file you provide: http://www.html-kit.com/favicon/

    Avatar of Stu-art
    Anonymous

    I’ve tried what you suggested in this post for the favicon and its failed, i have the icon file in the same folder as the header.php, so I’m thinking that it should work with the way you typed the code out, or am i wrong. on my blog its the same code but instead of url it has directory in its place. is this ( ?>/favicon.ico ) the url that your referring to in the post.

    can you help with this please.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    @Stu-art

    Two thoughts:

    Is your favicon file in actual .ico file format, or did you just rename an image file?

    Remove the forward slash before favicon.ico

    Avatar of Stu-art
    Anonymous

    Thanks for the reply, Yes the file is a ico format file and I’ve removed the forward slash and its still not working.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Please provide the exact line of code you’re using.

    Avatar of Stu-art
    Anonymous

    There you go Jeff

    <link rel=”shortcut icon” href=”<?php bloginfo(‘template_url’); ?>favicon.ico” />

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    My mistake. You need to put the forward slash back since bloginfo(‘template_url’) does not append it.

    You have the favicon.ico file in the root of the buddypress-home folder?

    Avatar of Stu-art
    Anonymous

    Yes thats correct i put it in the root folder for ease of getting the icon to appear, i was thinking does the line of code need to be in a particular area of the header.php file, like line 29 for instance or could it go anywhere. thats the only thing i can think of.

    Avatar of Archik100
    archik100
    Participant

    @archik100

    Clear your cache, refresh your browser. Not all browsers refresh the favicon though. Chrome does. (I think Firefox too.)

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    It has to be somewhere between the opening and closing head tags

    <head></head>

    It cannot go in the body section.

    Also, I assume that you\’ve followed the standard directory structure for the themes:

    '/wpmu/wp-content/themes/buddypress-home

    Avatar of Nicola Greco
    nicolagreco
    Participant

    @nicolagreco

    <?php

    function my_favicon() {
    ?>

    <link rel="shortcut icon" href="/favicon.ico" />

    <?php
    }
    add_action( 'wp_head', 'my_favicon' );

    ?>

    put it in a file my_hacks.php and put the file in mu-plugins/

    put your favicon, in the root directory

    Remember:

    <?php bloginfo('template_url'); ?> won’t work fine because the template url changes when you’re in pages that use the member theme

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    @Nicola-

    Remember:

    <?php bloginfo('template_url'); ?>

    won’t work fine because the template url changes when you’re in pages that use the member theme

    This is what I use on my dev site and it works just fine. No need for an extra php file, just a simple, single line of code in the head section of the header file.

    Avatar of Stu-art
    Anonymous

    I’ll try your suggestions, and thanks for your input, safe to say I’ll get in touch again if it’s not solved.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Stu-art-

    If you want the favicon on both your home and member pages, you must stick this code in the head sections of both header files.

    Avatar of Stu-art
    Anonymous

    just to make sure I’m doing this install right can you tell the correct destination of the member-theme please.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Home theme:

    wp-content/themes/buddypress-home/

    Member theme (for RC1):

    /wp-content/member-themes/buddypress-member/

    Avatar of Nicola Greco
    nicolagreco
    Participant

    @nicolagreco

    jeff you know, i don’t like touch the code :)

    (given that an update to the member theme or to the home, will break your install :)

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Nicola-

    You are correct! That is an important point.

    I should have mentioned that I use this technique only with my custom themes, not with the standard BP themes.

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    Another cool favicon generator:

    http://www.favicon.cc/

Viewing 20 replies - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.