Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to link to BB member profile instead of author profile?


  • stevie79
    Participant

    @stevie79

    I’m wanting to basically put at the end of an article, that’s written by somebody:

    Article written by [link to buddypress profile]

    I’ve seen a few threads on this, yet it’s never mentioned where certain code needs to be placed.

    I’ve not found a way to do it with any theme, even Twenty Twelve etc.

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

  • otty-dev
    Participant

    @ottiya

    Also looking for this! And also making it so that when you click on the author, it redirects to that person’s buddypress profile page


    stevie79
    Participant

    @stevie79

    Yes ottiya.

    It’ll be hyperlinked – when someone clicks it, they then see that person’s buddypress profile.

    Basically, instead of it going to an author’s page (which lists all posts written by that author), it instead like you mentioned, goes to the Buddypress profile of that member… so domain.com/members/fred or domain.com/members/fred/profile


    otty-dev
    Participant

    @ottiya


    David Cavins
    Moderator

    @dcavins

    Hi, the easiest way to do this is to filter the WP “author link” so that it redirects to the member’s BP profile: https://gist.github.com/dcavins/94e4989cad997d0553e8e5db37f30b40

    If you want to change the template used by an article, it will depend on your theme. For instance, if you were using twentyseventeen and wanted to add the author’s link to the meta section at the end of a post, it looks like you’d want to create a new version of the function twentyseventeen_entry_footer(). So you could copy that function to bp-custom.php or your child theme’s functions.php file, then add the function the_author_posts_link() where you want the link to appear. in any case, adding the author link to a post is a common WP task, so I’m guessing there are lots of tutorials about how to manage that part.

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