• 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

Remove Ads in Metro Pro Theme Blog Previews

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 › Remove Ads in Metro Pro Theme Blog Previews

This topic is: not resolved

Tagged: adsense ads, metro-pro theme, remove ads, remove adsense

  • This topic has 6 replies, 2 voices, and was last updated 10 years, 9 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • August 7, 2014 at 6:27 pm #117680
    wcinco
    Member

    Hello,

    I have AdSense on the top and bottom of my post. But I don't want it shown on the blog preview as seen here. How do I not display these ads -- but of course I still want them shown when a reader clicks on my post.

    Thanks,
    Warren

    http://www.thesuperblife.com
    August 7, 2014 at 9:19 pm #117698
    Brad Dalton
    Participant

    How did you add Adsense?

    You could use the

     if ( ! is_admin() ) { 

    conditional after the function which adds them.

    You can do this in the code or using a plugin like Widget Logic if you used widgets to display Adsense.


    Tutorials for StudioPress Themes.

    August 7, 2014 at 9:30 pm #117700
    Brad Dalton
    Participant

    Actually, try

    if (  is_admin() ) { 
    

    Tutorials for StudioPress Themes.

    August 7, 2014 at 9:46 pm #117702
    wcinco
    Member

    Hi there. Thanks for the reply. I used a plugin to input these ads. So should I add this code at the end of the AdSense code?

    August 7, 2014 at 11:27 pm #117710
    Brad Dalton
    Participant

    You will need to consult the plugin Developer as its a non StudioPress related question based on a third party plugin however the code will work if included in the correct function in the plugin.

    Another option is to use a plugin like widget visibility or widget Logic as previously mentioned.


    Tutorials for StudioPress Themes.

    August 7, 2014 at 11:36 pm #117714
    wcinco
    Member

    Sounds good. Thanks for all your help and replies =)

    August 8, 2014 at 1:13 am #117734
    Brad Dalton
    Participant

    No worries. It would be easier to customize if you use custom widgets as you could simply add the line of code to existing conditionals. Plugins are not easy to modify as there's over 30,000 and they are all coded differently.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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

© 2025 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