Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the Favicon

  • @xeomueller

    Participant

    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)
  • @bloom

    Participant

    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.

    @jeffsayre

    Participant

    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/

    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.

    @jeffsayre

    Participant

    @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

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

    @jeffsayre

    Participant

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

    There you go Jeff

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

    @jeffsayre

    Participant

    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?

    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.

    @archik100

    Participant

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

    @jeffsayre

    Participant

    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

    @nicolagreco

    Participant
    <?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

    @jeffsayre

    Participant

    @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.

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

    @jeffsayre

    Participant

    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.

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

    @jeffsayre

    Participant

    Home theme:

    wp-content/themes/buddypress-home/

    Member theme (for RC1):

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

    @nicolagreco

    Participant

    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 :)

    @jeffsayre

    Participant

    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.

    @jfcarter

    Participant

    Another cool favicon generator:

    http://www.favicon.cc/

Viewing 20 replies - 1 through 20 (of 20 total)
  • The topic ‘How to change the Favicon’ is closed to new replies.
Skip to toolbar