<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>堕天使マヨネーズのブログ | プログラミング</title>
	<atom:link href="https://mayonesu-blog.com/category/program/feed" rel="self" type="application/rss+xml" />
	<link>https://mayonesu-blog.com</link>
	<description>なんとなくだったが本格的に始動したブログ(不定期)</description>
	<lastBuildDate>Sun, 17 Feb 2019 05:18:20 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://mayonesu-blog.com/wp-content/uploads/2021/03/cropped-icon-100x100.jpg</url>
	<title>堕天使マヨネーズのブログ | プログラミング</title>
	<link>https://mayonesu-blog.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">199704500</site>	<item>
		<title>ddo.jpに使う広告の貼り付け方法(PCやスマホ・タブレット分岐)</title>
		<link>https://mayonesu-blog.com/archives/post_id=196</link>
					<comments>https://mayonesu-blog.com/archives/post_id=196#respond</comments>
		
		<dc:creator><![CDATA[堕天使マヨネーズ]]></dc:creator>
		<pubDate>Wed, 05 Dec 2018 04:52:38 +0000</pubDate>
				<category><![CDATA[プログラミング]]></category>
		<guid isPermaLink="false">https://mayonesu-blog.com/?p=196</guid>

					<description><![CDATA[現在使っているddo.jpは、広告をwebページ内に貼り付けることで半永久的にそのドメインを使い続けることができるわけなんですが(さらに毎月30回以上広告表示されないとダメです)、PCとスマホではサイズが違うのでそれぞれ [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>現在使っているddo.jpは、広告をwebページ内に貼り付けることで半永久的にそのドメインを使い続けることができるわけなんですが(さらに毎月30回以上広告表示されないとダメです)、PCとスマホではサイズが違うのでそれぞれに対応したバナーを入れたいと思うわけですよ。</p>
<p>そこでここではどのようにしてこのWordpress内に入れたのか(いやまあ見ればどこにあるかわかりますがｗ)を教えたいと思います。</p>
<p>広告を入れるベストな場所はフッターだと思うので(別にどこでもいいのですがｗ)フッターのウィジェットにカスタムHTMLを選択してください。</p>
<p>そこにこのような型を入れてください(この中には入れてないですが、scriptタグを忘れないでください。)。</p>
<pre>
<code>
    var ua = window.navigator.userAgent.toLowerCase();

	if(ua.indexOf('iphone') !== -1 || ua.indexOf('ipod') !== -1 || ua.indexOf('android') !== -1 || ua.indexOf('windows phone') !== -1 || ua.indexOf('ipad') !== -1){

	}
	else{

	}
</code>
</pre>
<p>これでスマホとPCで分岐ができました。あとはバナーをスマホ・タブレット用とPC用にそれぞれ入れれば表示されると思います。<br />
分岐とか考えてなければ元のバナースクリプトを張り付ければいい話なんですけどねｗ</p>
<p>ではでは！</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mayonesu-blog.com/archives/post_id=196/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">196</post-id>	</item>
	</channel>
</rss>
