Skip to content

Instantly share code, notes, and snippets.

@yllus
Created May 26, 2015 19:21
Show Gist options
  • Select an option

  • Save yllus/8a45a4e0f76cfeb4f8cb to your computer and use it in GitHub Desktop.

Select an option

Save yllus/8a45a4e0f76cfeb4f8cb to your computer and use it in GitHub Desktop.
<?php if ( is_home() ): ?>
<div id="ad_sliver" class="sliver">
<script> adUtility.insertAd("ad_sliver", { type: adUtility._AD_SLIVER }); </script>
</div>
<?php else: ?>
<div id="ad_sliver" class="sliver">
<script>if ( window.snBreakpointWatcher.breakPoint() >= 1024 ) { adUtility.insertAd("ad_sliver", { type: adUtility._AD_SLIVER }); }</script>
</div>
<?php endif; ?>
@yllus

yllus commented May 26, 2015

Copy link
Copy Markdown
Author
<?php if ( is_home() ): ?>
<div id="sliver" class="sliver">
    <script type="text/javascript">
        adUtility.insertAd("sliver", {type: adUtility._AD_SLIVER});
    </script>
</div>
<?php else: ?>
<div id="sliver" class="sliver">
    <script type="text/javascript">
        if( !Modernizr.mq('only screen and (max-width: 1007px)')  ) {
            adUtility.insertAd("sliver", {type: adUtility._AD_SLIVER});
        }
    </script>
</div>
<?php endif; ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment