0
所以我有這樣的代碼在我functions.php文件建立在WordPress的:AdSense廣告上顯示全尺寸移動
add_shortcode('testingad', function() {
if(aicp_can_see_ads()) {
return '<div class="aicp">
<center><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- AdSense Responsive Ad Code -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1111111111111111"
data-ad-slot="1111111111"</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center>
</div>';
}
然後我拉我想要的橫幅廣告出現在頁面上的短代碼,像這樣:
<?php echo do_shortcode('[testingad]'); ?>
的橫幅廣告看起來桌面上很大,但在移動設備上它仍然顯示爲全尺寸的,而不是裁剪到手機屏幕的大小。
我已試過谷歌的幫助,但要了解:(
任何幫助,將不勝感激它只是沒有幫助足以讓我!謝謝
請分享您的網站鏈接,您可以通過使用CSS媒體查詢設置手機屏幕尺寸廣告。 –
http:// photographersbas e.com - 廣告位於頁面底部,謝謝! – D4BV2