Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Link

  • @trishan1000

    Participant

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

    Keymaster

    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 🙂

    @trishan1000

    Participant

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

    @lloan

    Participant

    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.

    @trishan1000

    Participant

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

    @jslom

    Participant

    This will allow php in your widgets
    https://wordpress.org/plugins/php-code-widget/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Profile Link’ is closed to new replies.
Skip to toolbar