Skip to:
Content
Pages
Categories
Search
Top
Bottom

Open internal links in activity stream in new window


  • lrmo
    Participant

    @lrmo

    Is it possible to open ALL LINKS in the Aktivitystream in a new window? So also the internal links?

    If someone is reading through the aktivity stream, read page 1, page 2 … page 10, then click on a profile image or group link and then go back to page 10, then land on page 1!

    This is extremely frustrating for the users and makes no desire to read more.

    I have so far only found information for external links in a new window, but not for the internal links.

    I hope someone can help me. Thank you.

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

  • wasanajones
    Participant

    @wasanajones

    BuddyPress Activity Links Open in a New Tab

    //BUDDYPRESS ACTIVITY FILTER 
     
    function altlab_special_links_activity( $body ) { 
         $body = str_replace(' rel="nofollow"',' rel="nofollow" target="_blank"',$body);
     
        return $body; 
     
    }
    add_filter( 'bp_get_activity_content_body', 'altlab_special_links_activity', 15, 1 );
    

    add to bp-custom.php — if you don’t know what that is, you should


    epgb101
    Participant

    @epgb101

    I pasted this into a code snippet and it does nothing WP 5.7.1 – I set it to Run Snippet Everywhere.

    Not sure why this would not be standard option in Buddypress. In seconds all my users are off and outside my site which they don’t want to be! They want to stay on it – not have to keep finding the URL to my social network.

    Any ideas how to do this in activity stream?

    Thanks.


    rapidasia
    Participant

    @rapidasia

    code snippet or in bp-custom.php located in wp-contents/plugins/ folder ?

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