2008-12-28
WordPress, 心情日记
6,807 人浏览
plugins, 插件, 本站
因为大多主题的留言薄都是将最新留言放在最下面,所以很不习惯,通过小修小改即可把留言顺序按照最新留言放在上面了——即实现倒序。
修改 comments.php 里面的评论顺序
- //也很简单,只需要在文件中替换一处代码:
- <?php foreach ($comments as $comment) : ?>
- //替换成:
- <?php foreach (array_reverse($comments) as $comment) : ?>
如果有评论编号,做如下要改
通过上面的修改你的留言顺序应该倒过来了,如果有序号的话,还须把序号倒过来才算完美。不过有不少的模板主题的编号代码都不一样,有$iCommentCount或$iCommentnumber,我们仅用$iCommentCount做例子:
- $iCommentCount = 0;
- //...
- <?php $iCommentCount++; echo($iCommentCount); ?>
- //需要改成初始值为评论总数,输出一次自减一次,循环:
- $iCommentCount = get_comments_number();
- //...
- <?php echo($iCommentCount); $iCommentCount--; ?>
收藏自:http://seosem.ws/wordpress/no-plugin-guestbook-sort/
2008-09-19
WordPress
969 人浏览
倒序, 插件, 留言
2007-11-09
公益信息
2,221 人浏览
2008, flash, 倒计时, 北京, 奥运, 插件
Webware针对不同用户的需求整理了不同的最佳Firefox扩展,相信总有一份列表你会满意,从中发现有价值的内容方便自己的使用。列表如下:
Download.com: Best extensions for Firefox 2
Webware.com’s brothers at Download.com have a good general list, as covered inthis post.
About.com: Top 10 Firefox extensions
A collection of some of the most popular and useful general Firefox extensions.
Irfan Habib: My top 10 Firefox extensions
A thoughtful list for serious Firefox users. See also the comments to this post, which point to other good extensions.
Read/Write Web: Top 10 Firefox Web 2.0 add-ons
The focus is on effective browsing, bookmarks, and RSS. A good lineup if you explore the Web a lot and want to keep track of things you find.
The Simple Dollar: 10 Firefox plugs that save you money
Love the premise, even if it’s stretched a bit thin in this list. This is an unconventional list of extensions that, one way or another, can impact your pocketbook.
阅读全文 »
2007-08-11
网络应用
2,196 人浏览
10, firefox, 扩展, 插件
这里是我使用的WP插件,下面是我的安装方法。
网站地图插件Dagon Design Sitemap Generator
复制page.php文件并重命名为 sitemap.php,将如下代码:
- < ?php get_header(); ?>
- <div id="content" class="narrowcolumn">
- < ?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="post" id="post-<?php the_ID(); ?>">
- <div class="entry">
- < ?php the_content('<p class="serif">阅读全文 »'); ?>
- < ?php wp_link_pages(array('before' => '<p><strong>页面: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
- </div>
- </div>
- < ?php endwhile; endif; ?>
- < ?php edit_post_link('编辑', '<p>', ''); ?>
- </div>
- < ?php get_sidebar(); ?>
- < ?php get_footer(); ?>
改为如下代码:
阅读全文 »
2007-05-23
WordPress
2,765 人浏览
plugins, 安装方法, 插件