desktop/mobile

Viewing 8 posts - 1 through 8 (of 8 total)
  • #20283
    otherwhirl
    Participant

    Hello,

    Is it possible to hide the ad banner i have in the header widget area of the desktop version of the theme in the mobile version?

    In other words, I don’t want mobile users to experience the header ad.

    Thanks

    • This topic was modified 9 years, 11 months ago by otherwhirl.
    #20287
    Daniel Tara
    Keymaster

    You can add this media query to your custom CSS:

    @media (max-width: 736px) {
    	#sidebar-header {
    		display: none;
    	}
    }

    736px is the width of the viewport on iPhone 6 Plus in landscape mode which is currently the widest viewport on a smartphone. If you want to also hide it on tablets you can change it to 768px for portrait mode or 1024px for landscape mode.

    #20293
    otherwhirl
    Participant

    Worked great
    Thanks!

    #20294
    otherwhirl
    Participant

    Actually now the banner on the desktop version is getting cut off for some reason.
    It’s 736×98

    • This reply was modified 9 years, 11 months ago by otherwhirl.
    • This reply was modified 9 years, 11 months ago by otherwhirl.
    #20352
    Daniel Tara
    Keymaster

    This is not due to the code above, it doesn’t affect screens greater than 736px in any way, it’s most probably because of to another change.

    #20450
    otherwhirl
    Participant

    Hmmm… I’ll try on a fresh copy of the theme

    #20587
    otherwhirl
    Participant

    Hi,
    so I have footer ads I need to disable for mobile as well.

    I tried the code you gave which worked in the header:
    @media (max-width: 736px) {
    #sidebar-header {
    display: none;
    }
    }

    I tried using it with the following:
    @media (max-width: 736px) {
    #sidebar-footer {
    display: none;
    }
    }

    I even tried this one:

    @media (max-width: 736px) {
    #footer {
    display: none;
    }
    }

    #20588
    otherwhirl
    Participant

    I also would like to know how to disable javascript IM slider POP-up ad code?

    Basically I want the ability to have control over all ads on the mobile template.

    • This reply was modified 9 years, 10 months ago by otherwhirl.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.