This topic has 5 replies, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #6270
     willianlima83
    Participant

    Hi
    When my users click in any links on forum, activity, or other content on groups, the link is opened in the same window and it’s not good because it is forcing my user to leave my site.
    There some solution to make forum links opening in a new window?
    I think this is a good function to include on next version.

    #6319
     SQadmin
    Keymaster

    Hi,
    Try adding this to your sweetdate-child/functions.php

    COPY CODE
    
    function autoblank($text) {
    	$return = str_replace('<a', '<a target="_blank"', $text);
    	return $return;
    }
    add_filter('the_content', 'autoblank');
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6584
     willianlima83
    Participant

    Hi
    This code is not working… 🙁
    The forum links is opening in the same window still…

    #6632
     SQadmin
    Keymaster

    And works on normal posts? It that is the case then bbpress probably uses another filter for the content. Try their documentation or support

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6637
     willianlima83
    Participant

    No, it not works on normal posts too….
    No problem man… I thought it was simple to do..
    but I really think is better the users have not to leave our site when clicks on link posted on forum or activity…

    Thanks..

    #6717
     SQadmin
    Keymaster

    It will work only for content added to a post/page from the editor.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?