Prevent “nofollow” from Being Inserted into BBPress Posts

  • Unknown's avatar

    How can I prevent “nofollow” from being added to my internal links on bbPress posts? (I have the latest version of bbPress and WordPress)

    The “nofollow” attribute is being added to my internal links on my website (DCJTech.info). However, this issue only occurs on bbPress posts, but not WordPress pages. Here is an example of the problem (bbPress post) – http://dcjtech.info/topic/general-unixoid-topics/

    I have tried commenting out the below lines from ./includes/core/filters.php, but without success. I also cleared the cache (server and browser) and waited a minute before checking the page’s source code.

    add_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow ugc',   50   );
    add_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow ugc',   50   );

    I used ‘grep -r -e “follow” ./plugins‘ to find all code that may be inserting “nofollow”, and I also searched my theme and mu-plugins. In addition, I searched my SQL database (via phpMyAdmin) for “follow”. I did not find any plugin, setting, etc. that could be causing this problem. There were no “nofollow” attributes in the posts either. I also searched my plugins for “bbp_rel_nofollow”.

    I disabled “External Links” and commented out the previously mentioned bbPress code (and cleared the cache), but the “nofollow” attribute was still on my internal links.

    I thoroughly checked the WordPress codex website, forums (like https://bbpress.org/forums/topic/turning-no-follow-links-to-do-follow/ ), etc., but I cannot find a solution or cause.

  • Unknown's avatar

    This is the wordpress.COM support forum. We provide support only for WordPress.COM hosted blogs, and that site is not hosted here. You are posting to the wrong support forum.

    WordPress.COM and WordPress.ORG are completely separate and have different username accounts, logins, features, run different versions of some themes with the same names, and have separate support documentation and separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/

    If you don’t have a username account at WordPress.ORG account, then click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, https://wordpress.org/support/register.php so you can post to the support forums there.
    Resetting your WordPress.ORG password http://codex.wordpress.org/Resetting_Your_Password
    WordPress.org support docs are at https://codex.wordpress.org/Main_Page

  • Unknown's avatar

    @timethief , I am sorry for my error.

    By the way, as a temporary (but poor fix) the below code can be added to “functions.php”.

    //Remove nofollow
    function rm_nofollow($txt){
        $txt=str_replace(' rel="nofollow ugc"','',$txt);
        return $txt;
    }
    add_filter('bbp_get_topic_content','rm_nofollow ugc',20);
    add_filter('bbp_get_reply_content','rm_nofollow ugc',20);
  • The topic ‘Prevent “nofollow” from Being Inserted into BBPress Posts’ is closed to new replies.