文章内容

1、在Wordpress侧边栏添加广告
进入博客后台小工具widgets,将Text工具拖入侧边栏,展开Text 直接将广告代码粘贴进去保存即可。
2、在Wordpress文章內容顶部加广告
打开主题目录下的”single.php”,找到“<?php the_content();?>”代码所在的地方。在“<?php the_content();?>”上面加上广告代码即可:
1 | < div style=”padding:0px 10px″>广告代码</ div > |
3、在Wordpress文章內容底部插入广告
方法类似于在文章顶部插入广告,不同的是广告代码要加在“<?php the_content(); ?>”下面:
1 | < div style=”padding:0px 10px″>广告代码</ div > |
4、在Wordpress文章左侧或右侧插入环绕广告
同样的方法,在”<?php the_content(); ?>”上面加上广告代码即可:
1 | < div style = "float:left;width:336px;height:280px;" >广告代码</ div > |