本站使用的WordPress插件安装方法

这里是我使用的WP插件,下面是我的安装方法。

网站地图插件Dagon Design Sitemap Generator

复制page.php文件并重命名为 sitemap.php,将如下代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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">阅读全文 &raquo;</p>'); ?>
		<?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>', '</p>'); ?>	
    </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

改为如下代码:

1
2
3
4
5
6
7
8
9
10
11
<?php
/*
Template Name: SiteMap
*/
?>
<?php get_header(); ?>
    <div id="content" class="narrowcolumn">
        <?php echo ddsg_create_sitemap(); ?>
    </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

即时存档插件Extended Live Archives

复制page.php文件并重命名为 archives.php,将如下代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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">阅读全文 &raquo;</p>'); ?>
		<?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>', '</p>'); ?>	
    </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

改为如下代码:

1
2
3
4
5
6
7
8
9
10
11
<?php
/*
Template Name: Extended Live Archives
*/
?>
<?php get_header(); ?>
    <div id="content" class="narrowcolumn">
        <?php if (function_exists('af_ela_super_archive')) {af_ela_super_archive();} ?>
    </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

防止ADSENSE被GOOGLE封的插件DupPrevent和防止垃圾留言的插件Spam Karma 2
这两个插件启用后,我直接就用了没有设置。

代码高亮插件CoolCode
我基本只用<coolcode></coolcode>插入代码。

TAG插件Ultimate Tag Warrior
在你要显示TAG的地方添加如下代码:

1
2
3
<?php /* Tags */ if (function_exists('UTW_ShowTagsForCurrentPost')) { ?>
    <?php UTW_ShowTagsForCurrentPost("commalist") ?>
<?php } ?>

分页插件wp-pager2

找到所有如下代码:

1
2
3
4
<div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; 上一页') ?></div>
    <div class="alignright"><?php previous_posts_link('下一页 &raquo;') ?></div>
</div>
1
2
3
4
<p>改为如下代码:</p>
<div class="navigation">
    <?php wp_pager(); ?>
</div>

日志查看数插件WP-PostViews
在你要显示日志查看数的地方添加如下代码:

1
<?php if(function_exists('the_views')) { ?><?php the_views(); ?><?php } ?>

中文 WordPress 工具箱
最新发表,最新留言,随机日志等调用的插件,一般放在侧栏,在<ul></ul>之间添加如下代码

1
2
3
4
5
6
7
8
9
<li><h2>随机文章</h2>
    <ul><?php random_posts ($limit = 10, $length = 400, $before = '<li>', $after = '</li>', $show_pass_post = false, $show_excerpt_in_title = true); ?></ul>
</li>
<li><h2>最新文章</h2>
    <ul><?php get_recent_posts($no_posts = 10, $before = '<li>', $after = '</li>', $show_pass_post = false, $skip_posts = 0); ?></ul>
</li>
<li><h2>最新评论</h2>
    <ul><?php get_recent_comments($no_comments = 10, $before = '<li>', $after = '</li>', $show_pass_post = false); ?></ul>
</li>

站点统计插件WP Statistics
在你要显示站点统计的地方添加如下代码:

1
2
3
<?php if ( (function_exists('ShowStatistics'))) { ?>
    <?php ShowStatistics(); ?>
<?php } ?>
评论 (11) 引用 (0) 发表评论 引用文章
  1. 2010年07月8日, 10:10 上午 | #1

    路过打酱油

  2. 2009年02月20日, 1:30 下午 | #2

    写的很详细哈哈。

  3. 2007年08月20日, 4:17 下午 | #3

    本身就有分页功能,但是只能显示上一页和下一页,想要实现你说的功能要装插件

    分页插件wp-pager2

  4. hehe
    2007年08月20日, 9:25 上午 | #4

    建站时间问题也搞定了,呵呵
    再问个,日志多了怎么分页,就是首页显示5-8个文章,最下面给个第2,3,4页

  5. hehe
    2007年08月20日, 8:42 上午 | #5

    直接给出图片也好了
    那个统计插件怎么去掉建站时间以下的部分,我直接删除sample下面的不起作用

  6. hehe
    2007年08月19日, 4:15 上午 | #6

    还有 你的上面引用直接出图片的什么插件

    摘要怎么做??
    谢谢啊,新人

  7. hehe
    2007年08月19日, 4:03 上午 | #7

    已经好了
    但是能不能给说说yskin的怎么把建站时间等以后的时间显示
    去掉
    我这老是说插件错误,
    能不能给留下即时联系方式到我邮箱

  8. 2007年08月17日, 9:35 下午 | #8

    WP Statistics我用的是Yskin的,没有冲突啊。

  9. hehe
    2007年08月17日, 7:32 下午 | #9

    想问下
    中文工具箱
    和wp-stats不冲突么?
    怎么调试
    qq279887636

  10. 2007年07月16日, 2:34 下午 | #10

    OK,链接已经加上。

  11. zccpop
    2007年07月16日, 1:10 下午 | #11

    很干净的wp
    我的二栏还是得换掉
    上次的dark模版虽然还是不错的,但总结下来
    作为wp theme还是以白色为主

    希望在wp搭建上能够请教一下。
    顺便做个友链吧

  1. 没有引用

发表回复

顶端
底端