自己记录一下修改Xiu主题的一些细节,适合自己的东西自己记录下来,免得下次更新主题覆盖了不知道在哪里改回去!
(1)去除文章页面的“上一篇”“下一篇” ,在文件single.php里面,大约第40行开始
删除下面代码即可: <nav class=”article-nav”>
<span class=”article-nav-prev”><?php previous_post_link(__(‘上一篇’, ‘haoui’).'<br>%link’); ?></span>
<span class=”article-nav-next”><?php next_post_link(__(‘下一篇’, ‘haoui’).'<br>%link’); ?></span>
</nav>
(2)删除页面上类似“gongyi 发布于 2017-04-18” 这一行,找到expert.php
第61行,删除:
‘<p class=”text-muted time”>’.(($p_meta && isset($p_meta[‘siteauthor’]) && $p_meta[‘siteauthor’])?get_bloginfo(‘name’).’ – ‘:”).$author.’ ‘.__(‘发布于’, ‘haoui’).’ ‘.hui_get_post_date( get_the_time(‘Y-m-d G:i:s’) ).'</p>’,
(3)删除页面上“此处有XX张图” ,找到expert.php,第53行:
if( $img_number ) echo ‘<small class=”text-muted”><span class=”glyphicon glyphicon-picture”></span>’.$img_number.'</small>’;
(4)修改列表页标题字体大小,在后台自定义CSS里面添加:
.excerpt h2{
font-size:10px;
}
(5)修改内页(文章页)标题字体大小,在后台自定义CSS里面添加:
.article-title{
font-size:10px;
}
(6)修改列表页文章的字数,找到functions.xiu.php 大致在第556和566行。
第556行:function hui_get_excerpt_content($limit=180, $after=’…’){
第566行:function twentyeleven_excerpt_length( $length ) {
return 180;
}
(7) 关于WordPress后台发布时间与前端显示时间差8个小时的改动:
发表回复