Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove rel=nofollow from bbpress posts


  • malkah
    Participant

    @malkah

    Hi

    Is there a way to remove the rel=nofollow from bbpress posts?
    I want the links inside posts to be indexed.

    thanks

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

  • Gautam Gupta
    Participant

    @gautamgupta

    Untested, but this should work (put it in theme’s functions.php):

    remove_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow' );
    remove_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow' );

    If you also want to remove nofollow from users’ urls, add this too:

    remove_filter( 'bbp_get_reply_author_link',      'bbp_rel_nofollow' );
    remove_filter( 'bbp_get_topic_author_link',      'bbp_rel_nofollow' );

    malkah
    Participant

    @malkah

    Hi Gautam

    Im rather new to this.
    in wordpress dashboard I went to appearance>editor>Theme Functions (functions.php)

    where exactly in the code should I enter the code you indicated?

    thanks.


    Gautam Gupta
    Participant

    @gautamgupta

    The next line after <?php


    malkah
    Participant

    @malkah

    Hi
    It didnt work. can you look at the code to see if something is not configured correctly?

    this is how the code looks like after I edited Theme Functions (functions.php) from within the WP dashboard>appearance>editor:

    <?php
    remove_filter( ‘bbp_get_reply_content’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_topic_content’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_reply_author_link’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_topic_author_link’, ‘bbp_rel_nofollow’ );

    require_once TEMPLATEPATH . ‘/lib/Themater.php’;
    $theme = new Themater(‘HealthPress’);
    $theme->options[‘includes’] = array(‘featuredposts’);

    $theme->options[‘plugins_options’][‘featuredposts’] = array(‘hook’ => ‘main_before’, ‘image_sizes’ => ‘930px. x 300px.’, ‘effect’ => ‘fade’);
    if($theme->is_admin_user()) {
    $theme->admin_options[‘Ads’][‘content’][‘header_banner’][‘content’][‘value’] = ‘Free WordPress Themes‘;

    }


    malkah
    Participant

    @malkah

    If anyone is looking for this, here is the answer:

    Turning no-follow links to do-follow


    Ismail
    Participant

    @elhardoum

    thank you so much Gautam it worked for me .

    bbpress/includes/core/filters.php : added :

    add_filter( 'bbp_get_reply_content',   'bbp_rel_nofollow'              );
    add_filter( 'bbp_get_topic_content',   'bbp_rel_nofollow' 	       );
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar