Warning: include_once(/home/sites/lolipop.jp/users/lolipop.jp-dp16105308/web/wp/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: Permission denied in /home/users/0/lolipop.jp-dp16105308/web/wp/wp-content/advanced-cache.php on line 8

Warning: include_once(): Failed opening '/home/sites/lolipop.jp/users/lolipop.jp-dp16105308/web/wp/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/usr/local/php/7.4/lib/php') in /home/users/0/lolipop.jp-dp16105308/web/wp/wp-content/advanced-cache.php on line 8
携帯向けサイトにアドセンスを貼ってみた - Blog.IKUBON.com

携帯向けサイトにアドセンスを貼ってみた

このブログにも携帯からのアクセスがちょくちょくあるようなので、携帯向けのアドセンスを貼ってみました。携帯向けサイトはWordPressのプラグイン「Ktai Style」を利用しているので、こちらのテーマを直接いじらなくてはならず、備忘録としてメモしておきます。

フッターにアドセンスを表示させるには

 

footer.phpを開いて、4行目あたりにコードを貼り付け

<!--end paging-->
<?php ks_switch_inline_images(); ?>
<hr />
ここにコード
<div><a name="tail" href="<?php ks_blogurl(); ?>"><?php

 

個別の記事の上部にアドセンスを表示させるには

 

 

single.phpを開いて4行目にアドセンスのコードを挿入

<?php ks_header();
global $ks_settings;
?>
ここにコード
<!--start paging-->
<?php if (have_posts()) : the_post();
    if (! ks_is_comments()) :

 

サイトの確認はiPhoneだとKeitai Site Touchというアプリを、FirefoxからだとUser Agent Switcherというアドオンを利用すれば、よいと思います。

スポンサーリンク