在Wordpress文章內容顶部加广告:
打开主题目录(wp-content\themes)下的”single.php”,找到如下代码:
<?php
/* Run the loop to output the post.
* If you want to overload this in a child theme then include a file
* called loop-single.php and that will be used instead.
*/
get_template_part( ‘loop’, ‘single’ );
?>
这段代码是wordexpress的内容部分,你的广告代码既可以加在这段代码顶部,也可以加在这段代码底部。顶部对应文章顶部,底部对应文章底部。够简单吧。
文章作者:翼迅设计 张志刚 www.eqdh.com