Skip to:
Content
Pages
Categories
Search
Top
Bottom

Use the \”bp user link\” in a wp theme


  • eporedieis
    Participant

    @eporedieis

    Hi 2 all, i\’m new here.

    My big problem is that i want to link user\’s bp-profile in a wordpress theme. I use the wordpress theme because the home has any news, but i want – for example – that when anyone comment the article, with a click you can go to buddypress profile, and not in the author.php.

    I try with this code:

    < a href=”< ?php bp_user_link() ?>”>< ?php bp_user_fullname() ?>< /a> (without space after “<“)

    The fullname is empty (no results) and the link is at the opened page (as the \”#\”).

    I think i must include any files… Anyone can help me??

    Thanks so much!

Viewing 10 replies - 1 through 10 (of 10 total)
  • bp_core_get_userlink()


    eporedieis
    Participant

    @eporedieis

    Thanks, but not solved. If I call this from http://mywebsite/2009/04/hello-world/, the link that u get me is to http://mywebsite/2009/04/hello-world/

    The same thing that done the other php-call =( Do u know why?


    nightstalker101
    Participant

    @nightstalker101

    you mean this?

    <?php echo bp_get_loggedin_user_link($bp->loggedin_user->id) ?>


    eporedieis
    Participant

    @eporedieis

    Mmm…it doesn\’t work!

    I\’ve solved linking this: http://ivrealabella.it/members/&lt; ?php echo the_author_login(); ?>/


    trcwest
    Participant

    @trcwest

    I also want to do the same thing and link the users profile to the comments they make on blog posts.

    My memebers are called spotters!

    In what file or page Do i put this link in? is it comments.php or something similar in my wp theme?

    So basically how do i impliment it in so that when a user makes a comment it links to their profile

    http://spotskenya.com/spotters/< ?php echo the_author_login(); ?>/


    eporedieis
    Participant

    @eporedieis

    If you want it in the comments, you must insert in comments.php.

    If you want for the author’s article you must insert in single.php. For pages in page.php ;)


    elody
    Participant

    @elody

    It doesn’t seem to work anymore with the new RC2 … Any idea to make a link to a member profile from a WP theme please ?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Try bp_core_get_userurl or bp_core_get_userlink


    stargirl2
    Participant

    @stargirl2

    Hi there,

    I’m having this issue as well having tried all of the suggestions above – since this is marked as resolved could the OP or somone else who’s had this issue let me know what worked? I’ve been trying to use the link:

    < a href=”<?php global $bp; echo bp_core_get_userlink($bp->loggedin_user->id); ?>profile”>My Profile< /a>

    And, I don’t know quite enough about coding to know if this would make a difference (I wouldn’t think so!) but I have this within an if/else statement. This is in my main wp theme, not the bp theme.

    Thanks for the help!


    skritek
    Participant

    @skritek

    Hi BP n00b here but not a wordpress n00b. I am trying to get this to work as well with bp_core_get_userlink() as well. When I submit the_author_id() as an argument I get the author ID returned as the output of the function instead of the proper profile link. If I submit the author id as a simple string (in this case 6) I get the proper link returned? What am I missing here?

    so for the sake of clarity code that looks like this <?php echo bp_core_get_userlink(the_author_id()); ?> returns 6 and code that looks like this <?php echo bp_core_get_userlink(6); ?> returns the correct link to profile page.

    I don’t get it. Any help would be much appreciated

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Use the \”bp user link\” in a wp theme’ is closed to new replies.
Skip to toolbar