Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change the defaults for bp_activity_user_link()


  • f15d9f87d
    Participant

    @boyevul

    I’ve been looking for a solution to this with no success. My problem is that I want all links to the user buddypress page to instead go to their author page. So, for example, instead of going to (scarform.com/members/admin) I would like the link to go to (scarform.com/author/admin). I’ve peeled through the code trying to see if the answer would present itself to me, but … it hasn’t.

    Is there some simple way I can make this change? There are some plugins that do the exact opposite of what I want them to do, but is there some line of code I can add that will get this done?

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

  • r-a-y
    Keymaster

    @r-a-y

    @boyevul – Try this:
    http://pastebin.com/crrKbZWE

    Add this to your theme’s functions.php.


    f15d9f87d
    Participant

    @boyevul

    It works in the sense that it changes the avatar links, but it also leaves the name links as they are and tries to send all activity “view” links to /author/name/* instead of where they actually are – /members/name/*.

    It’s a good step in the right direction though.


    r-a-y
    Keymaster

    @r-a-y

    @boyevul – try this revision:
    http://pastebin.com/MGCv9nUw (updated)

    I’m filtering the bp_activity_user_link this time instead of the entire member domain! D’oh!


    f15d9f87d
    Participant

    @boyevul

    Awesome, works like a charm. I’m gonna have to peel back through the hooks to see what is calling “Name wrote…” link (which still hooks to /members/ instead of /author/). Thanks ^_^

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the defaults for bp_activity_user_link()’ is closed to new replies.
Skip to toolbar