• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Way to Block Adsense on Archive "Listing" Pages?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Way to Block Adsense on Archive "Listing" Pages?

This topic is: resolved

Tagged: Block Adsense

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 11 months ago by BP.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 15, 2016 at 3:06 pm #187606
    BP
    Member

    Is there a way to (safely - Google rules) block display/disable/hide Adsense ads from showing on post/article "Category" and "Tag" archive listing pages?


    Brad

    June 15, 2016 at 10:10 pm #187645
    Brad Dalton
    Participant

    Add a conditional tag to the code:

    if ( ! is_archive() )
    

    Tutorials for StudioPress Themes.

    June 16, 2016 at 9:08 am #187686
    BP
    Member
    This reply has been marked as private.
    June 17, 2016 at 5:38 pm #187769
    BP
    Member

    I figured it out. I remembered some PHP code I used in a non/pre HTML5 theme for a similar reason in the Genesis Simple Hooks plugin and it worked! Here's the code I used:

    For posts/articles:
    <?php if (is_single() ) { ?>
    <p>Adsense Code Goes Here</p>
    <?php } ?>

    For pages:
    <?php if (is_page() ) { ?>
    <p>Adsense Code Goes Here</p>
    <?php } ?>


    Brad

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble