Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change the link of the profile name (activity stream)

  • @imborx

    Participant

    Hi,

    I would like to point to another custom url when someone click in the profile of anybody instead of going to his buddypress profile. How can I do it?

    I need that in the activity stream

Viewing 4 replies - 1 through 4 (of 4 total)
  • @danbp

    Participant

    See template entry.php

    https://buddypress.trac.wordpress.org/browser/tags/2.3.3/src/bp-templates/bp-legacy/buddypress/activity/entry.php

    Caution: modification are preferably done via child-theme.

    @imborx

    Participant

    Thank you so much, but I don’t get where I have to place/modify that code (in what FTP route).

    Regards

    @shanebp

    Moderator

    If you use Dan’s approach, you want to do it by first making a template overload of the file he links to. And then writing a conditional for the calls to the user link. It will work fine.

    Or you can use the filter hook for bp_activity_user_link() and then you don’t need to touch template files. You could write a filter in theme/functions.php – something like:

    function imborx_profile_link( $link ) {
    
       if( $link != bp_loggedin_user_domain() )
           $link = // custom url
    
       return $link; 
    }
    add_filter( 'bp_get_activity_user_link', 'imborx_profile_link', 15, 1 );

    @imborx

    Participant

    Thank you shanebp 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the link of the profile name (activity stream)’ is closed to new replies.
Skip to toolbar