Skip to content

Instantly share code, notes, and snippets.

@pandanote-info
Last active July 8, 2018 13:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pandanote-info/b206136b74df153f861335d32794e8ea to your computer and use it in GitHub Desktop.
特定のURLが指定された場合に限りAmazonアソシエイトのMobile Popoverを表示するためのPHPのコード片。
function add_this_script_footer(){
if (is_mobile() && preg_match("#^/recolog#",$_SERVER['REQUEST_URI'])) {
?>
// ここにMobile Popoverのコードを挿入。
<?php
}
}
add_action('wp_footer', 'add_this_script_footer',999);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment