如何在wordpress中加入google adsense广告(百度联盟)


1.在wordpress文章中加入adsense:

在纯干净wordpress系统中(没有修改过的模板),编辑主题,在single.php文件中查找代码

1.1如果是要在文章顶部插入广告,那么把google adsense代码加入它的上面,例:

AD

1.2如果是要在文章尾部插入广告,那么插入下面,例:

AD

以上也可以不用div把他们框起来。

1.3如果是要文章围绕广告的样式,那么使用DIV float实现:

AD

注:上面的left,right选一个就好了, padding指与你的广告尺寸一样大或稍微大10个像素,使广告与文章文字之间有空隙好看。比如你要放256*256像素的google adsense广告,那么padding写成padding:266px 266px

效果如图:

2.在wordpress侧边导航栏放入adsense广告

可以在主题文件中编辑sidebar.php插入上面的广告代码实现,也可以在“小工具”那设置,如图:

<3.也可以在索引页模板index.php,标签页目录页,网站顶部header.php放置adsense广告。 百度联盟广告的代码放置同上。 [/av_textblock]

Need a translation service?

Please enter your personal details and we will contact you shortly

    Words translated by CCJK

    146,096,379

    Our Client Satisfaction

    Rating for previous quarter

    5.00

    Over 95% of our clients recommend our language services to others

    Copyright © CCJK Technologies Co., Ltd. 2000-2023. All rights reserved.
    TOP