이 블로그는 더이상 운영되지 않고 Archive 용도로 사용되고 있습니다.
새로운 블로그를 방문해주세요.

[stamp 3.0] 애드센스를 사용하지 않을 경우 해야 할 수정


stamp 3.0 부터 skin.html 파일에 애드센스 코드가 미리 입력돼있습니다.


애드센스를 사용하는 분들이라면 광고 단위 정보만 추가해서 사용하면 되는데, 사용하지 않는 분들은 본문 상단과 하단에 애드센스 광고 크기 만큼의 여백이 생기게됩니다.


상단 여백상단 여백


하단 여백하단 여백


이번 가이드는 애드센스를 사용하지 않는 분들을 위해 관련 코드의 제거 방법을 알려드리겠습니다.



skin.html 파일 편집

201 ~ 211번째 줄을 보면 다음 소스가 있습니다.


<div class="adsense_top">
	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
	<!-- 반응형 -->
	<ins class="adsbygoogle ads_top"
	style="display:inline-block"
	data-ad-client="ca-pub-"
	data-ad-slot=""></ins>
	<script>
	(adsbygoogle = window.adsbygoogle || []).push({});
	</script>
</div>


통채로 제거해주세요.


그 밑을 보면


<div class="adsense_bottom">
	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
	<!-- 반응형2 -->
	<ins class="adsbygoogle ads_bottom"
	style="display:inline-block"
	data-ad-client="ca-pub-"
	data-ad-slot=""></ins>
	<script>
	(adsbygoogle = window.adsbygoogle || []).push({});
	</script>
</div>


이 소스가 있습니다.


마찬가지로 지워주세요.



style.css 파일 편집

※ 이 부분은 그냥 놔둬도 상관없습니다.


* adsense 를 검색하면 다음 소스가 나옵니다.


/*
 * adsense
 */
#content .adsense_top { margin: 25px auto 0; max-width: 728px; text-align: center; }
#content .adsense_bottom { margin: 0 auto 15px; max-width: 728px; text-align: center; }

#sidebar .adsense { padding: 10px; text-align: center; }
.ads_top { width: 300px; height: 50px; } .ads_bottom { width: 300px; height: 250px; } .ads300x600 { width: 300px; height: 600px; }
@media (min-width: 500px) { .ads_top { width: 320px; height: 100px; } .ads_bottom { width: 300px; height: 250px; } } @media (min-width: 800px) { .ads_top { width: 728px; height: 90px; } .ads_bottom { width: 728px; height: 90px; } } @media (min-width: 961px) and (max-width: 1024px) { .ads_top { width: 300px; height: 250px; } .ads_bottom { width: 300px; height: 250px; } } @media (max-width: 960px) { .ads300x600 { display: none; } #sidebar .adsense { display: none; } }


통채로 지워주세요.

최근 댓글