Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Link

  • Avatar of Trishan1000
    Trishan1000
    Participant

    @trishan1000

    Hi,

    Please help me with creating a link to the profile page of the logged in use on my site.
    I just want to add a link on the page or a widget to lead users to their profile from the front page.

    Please give me an idea how to do this?

    I inserted the code below as is into a text widget to test and it returns a 404 error.

    <a href="<?php echo bp_loggedin_user_domain(); ?> ">Profile</a>

    I do not know how to use it. Please help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    You can’t put PHP into a text widget. You need to edit one of the template files in your theme add it in. You’ll need to figure out which template contains the part of the theme that you want to add this link next to :)

    Avatar of Trishan1000
    Trishan1000
    Participant

    @trishan1000

    Thanks that makes sense.
    Is there any way to create an HTML link to the logged in user profile?

    Avatar of lloan
    lloan
    Participant

    @lloan

    Couldn’t you use the Buddypress Log-in widget? It shows the users profile image and their username that links back to their profile page.

    Avatar of Trishan1000
    Trishan1000
    Participant

    @trishan1000

    Thank you! I didn’t even think of that, It actually helps quite a bit.

    Avatar of jslom
    jslom
    Participant

    @jslom

    This will allow php in your widgets

    http://wordpress.org/plugins/php-code-widget/

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

You must be logged in to reply to this topic.