Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can i add “View Profile” link so that when click it will link to that user profile


  • funmi omoba
    Participant

    @funmi-omoba

    Hi, i will like to add “View Profile” link in members-loop. can someone please help me with the code or point me into right direction of the code.

    thank you.

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

  • Tammie Lister
    Moderator

    @karmatosed

    A in view your profile or view the members profile? I ask as two different things.


    pcwriter
    Participant

    @pcwriter

    @funmi-omoba

    In members-loop.php, simply add the following inside `

    `
    `<a class="button" href="`

    Then in style.css of your child-theme, add
    `#members-list .item-title a.button { float:right; }

    You’ll wind up with a button styled just like all other buttons in your theme, linked to each member’s profile, sitting nicely on the right side. Edit the styling if you don’t want it on the right :-)


    pcwriter
    Participant

    @pcwriter

    Sorry, that line should be:
    `<a class="button" href="View Profile`


    funmi omoba
    Participant

    @funmi-omoba

    @pcwriter thanks so much, will check it out.


    funmi omoba
    Participant

    @funmi-omoba

    @pcwriter, i dont know why this is not working for me, i put it in members-loop.php in my child theme, but nothing shows.


    pcwriter
    Participant

    @pcwriter

    @funmi-omoba

    You’re right, it won’t work ‘cuz there are typos in the code… sorry, my bad :-(

    Find this in members-loop.php (around line 30)
    `

    <a href="”>

    `

    …and replace with this:
    `

    <a href="”>
    <a class="button" href="”>View Profile

    `

    Then add this to your child-theme’s style.css
    `#members-list .item-title a.button {float:right;}`

    I just tested it and it works fine. Remember to respect the file structure in your child-theme: members/members-loop.php


    funmi omoba
    Participant

    @funmi-omoba

    @pcwriter, you are a star, thumb up. it now fire on.

    works great

    thanks


    syncddesign
    Participant

    @syncddesign

    I have a similar problem…

    I would like to add a view profile button, which is only showns if your friends with that person.
    Is it possible to display in the same way that ‘Cancel Friendship’ and ‘Add Friend’ currently work.

    I think its got something to do with the bp-friends-template.php , but I’m not sure.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can i add “View Profile” link so that when click it will link to that user profile’ is closed to new replies.
Skip to toolbar