Adsense in category/tag/search pages

  • speedy



    I would like to display google adsense only in my posts and nowhere else.

    In the option menu, I checked “display adsense” and I unchecked “display adsense in front page”.

    With these settings, adsense are actually displayed in post and not in the front page… however, they are actually displayed in all category, tag, and search pages.

    Is there any possibility to avoid this and display adsense only in posts?

    Note that I’m still using graphene v1.1.3.1 (I would like to keep this one because my image header does not fit with the new graphene version).




    I finally managed to fix the problem. I just changed the following code in loop.php:

    <?php if (is_single() || is_page() || (is_front_page() && get_option('graphene_adsense_show_frontpage')) || is_archive() || is_search()) {graphene_adsense();} ?>

    New code:

    <?php if (is_single() || is_page() || (is_front_page() && get_option('graphene_adsense_show_frontpage')) || (is_archive() && get_option('graphene_adsense_show_frontpage')) || (is_search() && get_option('graphene_adsense_show_frontpage'))) {graphene_adsense();} ?>

    Thanks for this great theme!

Viewing 2 posts - 1 through 2 (of 2 total)

  • You must be logged in to reply to this topic.