Skip to:
Content
Pages
Categories
Search
Top
Bottom

WordPress MU/BP Integration: post_author_link issue


  • BrianStevens
    Member

    @brianstevens

    Hello,

    I have just completed integrating bbPress into my WordPress MU installations. Buddypress is also installed, but I have not taken other steps in order to integrate Buddypress with bbPress significantly. It works really well: when a user signs up on WordPress, they appear as a user in bbPress.

    I have only run into one problem, which is this.

    On post.php in my theme file, I use <?php post_author_link(); ?> as a link the author’s profile. By my understanding, this should link to the Buddypress profile without any additional set up. Instead, when I click the link it goes to the post author’s site as defined in the user’s Profile in the WordPress Admin Dashboard. I want post_author_link to go to their Buddypress profile, not an external website. Obviously their Buddypress profiles are more important since the site focuses on community. Linking to an external site will detract from that quite greatly.

    Thank you for any help on this matter.

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

  • gerikg
    Member

    @gerikg

    try this:

    http://pastebin.com/9Y1mPZwY

    I had a better solution but I can’t remember it now. The code above only works if bbpress is in wordpress folder which 99% of people do.


    BrianStevens
    Member

    @brianstevens

    Close, but the code was slightly off, and I was able to adjust it to my needs.

    Thanks! :)


    BrianStevens
    Member

    @brianstevens

    Alright, it turns out I was a bit preemptive in declaring “Mission Accomplished.”

    I modified your code because it originally didn’t work. Here is where I am stuck.

    http://pastebin.com/rKBL3Wiy

    Now, the link shows up formatted correctly, but it links to the wrong page and then redirects home.

    You see, post_author calls up the user’s Display Name, not their username, which is what post_author calls.

    So that links to http://www.example.com/members/Brian Stevens, rather than http://www.example.com/members/bstevens

    Does anyone know the code to call the username, rather than display name? post_author_id also did not work. I’m not sure how to call their account name.


    gerikg
    Member

    @gerikg

    sorry I was missing something…


    gerikg
    Member

    @gerikg

    echo get_user_name(get_post_author_id());

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar