Adsense Ads on mobile devices.

Hello. My site is

I am displaying some adsense ads which show up on the right bar if viewed on desktop. But when viewed on mobile devices, all the ads get cramped at the bottom, at the end of the post/content. How do I get the ads to show within the content? Thanks.

  • Ash
    • WordPress Hacker

    Hello @kj

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Do you mean you want to show ads at the middle of content in mobile view? If yes, then you have to add the ads manually in every post. Lile:

    <p>Post content...</p>
    <p>Post content...</p>
    <div class="mobile-ad">Your ad code</div>
    <p>Post content...</p>
    <p>Post content...</p>

    Then add the following css:

    display: none;
    @media only screen and (min-width: 320px) and (max-width: 480px) {
    display: block;

    You can add this to a theme’s stylesheet, in a child theme, or using a plugin like My Custom CSS.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.