• 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

Customizing the ad experience for mobile screen size

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 › General Discussion › Customizing the ad experience for mobile screen size

This topic is: not resolved

Tagged: mobile responsive ad google

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by Christoph.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 26, 2016 at 5:17 pm #190246
    rdr
    Participant

    Hi, folks. I use Genesis Simple Hooks and the genesis_entry_footer entry to place Google Ads in my site at http://www.RSNStats.com/blog. It works fine.

    Problem is, the same ad I show on the desktop messes up the theme's mobile experience. Specifically, since the ads are wider than the phone's display, they make it possible to scroll horizontally when the site is viewed on a mobile device. Obviously, that's not the experience I want.

    Ideally, I'd like to test inside the hook whether we're mobile or desktop and customize size of the ad I'm displaying.

    Can anyone give me advice on how to get the effect I'm looking for? I'm not a web programmer, so any extra steps you can provide will be very helpful.

    Thanks in advance,

    -- Robert

    http://www.RSNStats.com/blog
    July 26, 2016 at 9:41 pm #190265
    Christoph
    Member

    Hi Robert,

    unfortunately, PHP is not very good at detecting mobile devices.

    I would recommend you take a look at the plugin Mobble https://wordpress.org/plugins/mobble/
    and the is_mobile conditional.

    Alternatively, Anita has a tutorial and a plugin to show ads on mobile only:
    http://cre8tivediva.com/add-mobile-friendly-ads-on-smaller-devices-using-genesis/


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ 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