Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing the ”view” link from the activity stream


  • Roger Coathup
    Participant

    @rogercoathup

    @pcwriter et al:

    A few people have asked about removing the “view” link in the activity stream, and those pesky, good for nothing permalink pages that it leads to.

    This little snippet in your functions.php will remove the link from your activity stream output:

    `
    // removes the view button
    function no_permalink($content)
    {
    return “”;
    }

    add_filter(‘bp_activity_permalink’, ‘no_permalink’);
    `

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

  • Roger Coathup
    Participant

    @rogercoathup

    p.s.

    this doesn’t remove the permalink pages themselves, and I think the @mention notifications still lead to them.

    So, you should still create the template in your theme – add some doodles or animated gifs or something.

    could redirect before loading the single/activity/permalink template -> `bp_core_redirect( $bp->loggedin_user->domain );`

    just hook on the action bp_activity_screen_single_activity_permalink


    LPH2005
    Participant

    @lph2005

    Thank you. The function works like a charm and gives a cleaner activity stream.


    pcwriter
    Participant

    @pcwriter

    @LPH2005

    Did you use the redirect suggestion @nuprn1 made above?
    If so, could you post your complete code to help everyone out? :-)

    (BTW, thanks for the email the other day. I’m still messing around with the code for bp-wp-navbar but haven’t nailed down the bug.)


    LPH2005
    Participant

    @lph2005

    @pcwriter – The function posted by @rogercoathup was used to get rid of the “view” link and the steam on TheChemBook has an added reply button for forum posts using the function found in this forum topic: http://etivite.com/groups/buddypress/forum/topic/how-did-you-add-the-view-blogpost-button/#topic — this directs the browser to the forum topic so their reply doesn’t just end up in the activity stream.

    You are welcome on the bp-wp-navbar code email. That plugin could be a real winner once that bug is tracked down and squashed.

    PS. Your code prompted learning more about Codelobster and php. Infact, XAMPP was installed just so that more php code be learned. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing the ”view” link from the activity stream’ is closed to new replies.
Skip to toolbar