主页 » WordPress » wordpress2.7终于来了

wordpress2.7终于来了

2008-12-11gao

wordpress2.7从第一次传出,到今天已经经历了很长一段时间,鸽子也飞了好几次,终于在众人的千呼万盼中于今天真试到来.( 昨天下午5点装的RC2  - -!  后台整体外观和RC版没有区别,暂时还没发现问题。

下面说说主题吧,更新到2.7主题要修改的文件在header.php和comments.php

(ps: 如果你不使用自带的评论嵌套就可以不改.)

首先,打开主题文件中的header.php,在<?php wp_head(); ?>之前加上

<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

然后打开comment.php找到<ol class=”commentlist”>….</ol>

把<ol class=”commentlist”>  </ol>之间的代码换为

<?php wp_list_comments(); ?>

改后既是

<ol class="commentlist">
<?php wp_list_comments(); ?>
</ol>

再在此句下面加上

<div class="navigation">
<div class="alignleft"><?php previous_comments_link() ?></div>
<div class="alignright"><?php next_comments_link() ?></div>
</div>

(意思是评论翻页,在后台设置-评论可以设置,class=”…”随便你用

查找到第2个<?php if (‘open’ == $post->comment_status) : ?>,在其和<?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?> 之间代码改为

<div id="respond">

<h3><?php comment_form_title( ‘Leave a Reply’, ‘Leave a Reply to %s’ ); ?></h3>

<div class=”cancel-comment-reply”>
<?php cancel_comment_reply_link(); ?>
</div>

找到tabindex=”5″,在该句的最后面把函数改为<?php comment_id_fields(); ?>

在最后一个</form>后加上</div>

登录后comment.php不能退出问题,找到该句把后面一个函数换为

<?php echo wp_logout_url(get_permalink()); ?>

OK .不明白的或不会改的可以再此留言.

3条评论我也说两句

  1. 新年快乐!~~

  2. 评论翻页…………我正需要这个呢,研究一下……

    感谢分享哈

  3. wp更新的很快呀,

    你的博客不错,做个链接吧

    已经做好你的链接啦

    我的博客
    一杯茶
    http://cha.xuexibbs.com

发表评论

必填

必须的

随你高兴