How to ads stop when on mobile : Wordpress

Discussion in 'HTML & Website Design' started by gaumzi.cool, Aug 10, 2014.

  1. #1
    I own this news website, http://techlions.in/
    What I want to know, is there any plugin which stop advertisement when a user visits my website from a mobile device..???
     
    gaumzi.cool, Aug 10, 2014 IP
  2. ptrrsnv

    ptrrsnv Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    you can try to detect if the user is using a mobile using this php code:
    http://mobiforge.com/design-development/lightweight-device-detection-php
    you just need to adapt it for your theme/plugin to display ads if the user is not on mobile or to hide such

    if you need any further help with this, let me know
     
    ptrrsnv, Aug 11, 2014 IP
  3. webmaster_crasher

    webmaster_crasher Member

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    The best way is to use CSS3 Media Queries. it will detect a mobile in very lighter way and you dont have to install or add some php codes.. Through CSS3 Media Queries, you can hide certain areas during mobile viewing
     
    webmaster_crasher, Aug 12, 2014 IP
  4. Sawkat

    Sawkat Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    Support your theme by less framework. then you can use ad section "<div>" display:block/none.

    Example:
    Html code:<div class="advertisement">Your ad code here</div>
    CSS code:
    In desktop: .advertisement{display:block}
    In Mobile: .advertisement{display:none}

    I hope you understand :)
     
    Sawkat, Aug 13, 2014 IP
  5. Riots

    Riots Active Member

    Messages:
    374
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #5
    Perfect answer right here.
     
    Riots, Aug 16, 2014 IP