Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing/Blocking Adsense Ad


  • sidelancer
    Participant

    @sidelancer

    I’m using the Easy Adsense plugin and I would like to prevent it from showing an ad on my forum pages. The plugin does have a custom field to disable ads on specific pages, but the problem is that it only disables ads that are outside the forum area (the header and the sidebar), NOT the ad that is showing inside of the forum content area.

    Does anyone know where I could insert/delete some code to stop it from showing up?

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

  • sidelancer
    Participant

    @sidelancer

    Bump.


    Robin W
    Moderator

    @robin-w

    can you either give a link or a screenshot so we can see exactly where it is ?


    sidelancer
    Participant

    @sidelancer

    Yep, here it is:

    Adsense Ad

    I’ve looked at it with Firebug, it’s the same header ad that I have showing up on all my other pages (except there it is ABOVE the page, not within it). I also tried putting php code around the ad to stop it on specific page numbers, but that didn’t seem to work either.


    Robin W
    Moderator

    @robin-w

    I suspect it is the loop-single-forum template

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original

    then

    remove lines 20 and 24

    line 20

    <?php do_action( 'bbp_theme_before_forum_subscription_action' ); ?>
    

    line 24

    <?php do_action( 'bbp_theme_after_forum_subscription_action' ); ?>
    

    come back if that doesn’t work


    Sam Rohn
    Participant

    @sam-rohn

    you could also try to select the specific adsense css element within whatever bbpress element and then do something like

    li.bbp-header .adsense {
    display: none;
    }

    sam


    sidelancer
    Participant

    @sidelancer

    The template did change to the new php file, but removing the code did not remove the ad unfortunately. I tried removing other code but nothing seems to affect it.

    edit: I’d love to just hide the ad with CSS, but the problem is that is against google policy.


    sidelancer
    Participant

    @sidelancer

    I ended up switching to a different adsense plugin. Thanks for the help

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