Skip to content

Instantly share code, notes, and snippets.

@bi0xid
Created April 26, 2020 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bi0xid/0a4565cbf543561cbe87045befaaef14 to your computer and use it in GitHub Desktop.
Save bi0xid/0a4565cbf543561cbe87045befaaef14 to your computer and use it in GitHub Desktop.
<?php if ( jetpack_is_mobile() ) // if is mobile ?>
<?php else :
if (function_exists('is_amp_endpoint')) : //if is AMP
if (is_amp_endpoint()) : ?>
<?php else : // !is_amp_endpoint() ?>
<!-- DESKTOP ADS -->
<?php endif; // end is_amp_endpoint()
endif; // end function_exists(is_amp_endpoint)
endif; // end jetpack_is_mobile(); ?>
<?php
if ( jetpack_is_mobile() ) { // if is mobile
} else {
if (function_exists('is_amp_endpoint')) { //if is AMP
if (is_amp_endpoint()) {
} else { // !is_amp_endpoint()
// DESKTOP ADS
} // end is_amp_endpoint()
} // end function_exists(is_amp_endpoint)
} // end jetpack_is_mobile()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment