模板修改侧边栏中加入最近发表



模板修改侧边栏中加入最近发表。我设置的是显示最近发表的5篇文章。

用法是wp_get_archives(‘type=postbypost&limit=5’);

还把菜单栏修改了,更改了网站的布局。

另将归档列表改为表单式。

这个代码也是学习别人的,共享给大家。

<form id=”itoflyform” action=””>
<select name=”itofly” onchange=”window.location =
(document.forms.itoflyform.itofly[document.forms.itoflyform.itofly.selectedIndex].value);”>
 <?php get_archives(‘monthly’,”,’option’); ?>
 </select>
 </form>
 </li>

本Blog的WordPress模版更新

看到别人的blog可以显示前一篇文章,后一篇文章就学习了。用以下的代码可以实现,由于本人的css学的不好,不能用div很好地将标题左置、右置,所以用了table,大家见笑了。

<div class=”navigation”>
  <table width=”100%” border=”0″>
  <tr>
    <td align=”left”>
    <?php previous_post_link(‘<span>«前一篇</span> %link’) ?></td>
    <td align=”right”><?php next_post_link(‘%link <span>后一篇»</span’) ?></td>
  </tr>
</table></div>

我修改的是single.php