Skip to:
Content
Pages
Categories
Search
Top
Bottom

Replacing bp_add_friend_button with icon

  • @4colourprogress

    Participant

    Hi All,

    Not sure if this is the right place for this so sorry if thats the case!

    I’m currently trying to change the 2 buttons listed as “Add Friend” and “Send Private Message” on my theme to icons instead of words.
    I’ve managed to get the “Send Private Message” Icon working perfectly by editing the file members/single/member-header.php but when I try to to wrap the bp_add_friend_button function in an a href but It doesn’t seem to want to work!

    Here is the code that I used for the icons

    `

    <a href="”><img src="http://www.pixelcove.co.uk/images/addcontact.png&quot; title="Follow “>

    <a href="”><img src="http://www.pixelcove.co.uk/images/messagecontact.png&quot; title="Message “>

    `

    Any advice on this would be greatly appreciated!

    Many Thanks

    Chris :)

Viewing 4 replies - 1 through 4 (of 4 total)
  • @gunju2221

    Participant

    The “Add Friend” button won’t work because the “ is different from `<div class="generic-button"` where you can just hook the icon into the generic button through image tags.

    @4colourprogress

    Participant

    Okay well I tried hooking the icon by adding another generic button div but it still wont acknowledge it as a link. I’m guessing it’s something to do with the fuction, but if I’m not suppost to put the code in that file then where should I be putting it ?

    `

    <a href="”>
    <img src="http://www.pixelcove.co.uk/images/addcontact.png&quot; title="Follow “>
    <a href="”>
    <img src="http://www.pixelcove.co.uk/images/messagecontact.png&quot; title="Message “>

    `

    @gunju2221

    Participant

    Don’t do that, because now when any user clicks “Add Friend”, it will just do nothing, and not request it.

    You will have to do it via css
    `background-image:url(‘img_tree.png’);
    background-repeat:no-repeat;`

    @4colourprogress

    Participant

    Yeah thats what I thought :(

    Would the css just be like

    .bp_add_friend_button
    background-image:url(‘http://www.pixelcove.co.uk/images/addcontact.png&#8217;);
    background-repeat:no-repeat;

    Or am I missing something?

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replacing bp_add_friend_button with icon’ is closed to new replies.
Skip to toolbar