Wordpress

Wordpress

WORDPRESS定制之處:

1、D:\PhpNow\htdocs\wp\wp-includes\post.php

//if ( mysql2date(‘U’, $post_date_gmt, false) > mysql2date(‘U’, $now, false) )
// $post_status = ‘future’;

这两行判断时间,进行定时发布,我习惯一天一天累加发布

2、SIMPLE TAGS

D:\PhpNow\htdocs\wp\wp-content\plugins\simple-tags\extras simple-tags.importer.php

importer 函数:

$objects = $wpdb->get_results( “SELECT ID, post_title, post_title FROM {$wpdb->posts} WHERE {$type_posts} ORDER BY ID DESC LIMIT {$n}, 20″ );

原本获得内容,进行比较等。这样生成的TAG非常多。

D:\PhpNow\htdocs\wp\wp-content\plugins\simple-tags\2.7\inc simple-tags.admin.php

pageAutoTags函数

$objects = (array) $wpdb->get_results(“SELECT p.ID, p.post_title, p.post_title FROM {$wpdb->posts} p WHERE {$post_type_sql} ORDER BY ID DESC LIMIT {$n}, 20″);

3、页面部分

single.php

增加 上一篇、下一篇:<div class=”post-title”>
<h1><?php previous_post(); ?>   <?php next_post(); ?></h1>
</div>

增加阅读次数:<?php if(function_exists(‘the_views’)) { the_views(); } ?>

right-sidebar.php

增加页面显示计时:<div class=”widget-header”>Post Stats</div>
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>  seconds.

left-sidebar.php

增加BACKLINKS显示

<div class=”left-widget”>
<?php if(get_option(‘backlinks_key’)) : ?>
<div class=”widget-header”>Partner links</div>

<?php backlinks_links()?>
</div>
<?php endif; ?>

footer.php

增加 备案链接、统计JS代码

archive.php

不显示 目录说明: <?php /* echo category_description();  */?>

增加时间、评论、页面URL、点击次数等

<?php /* the_content(‘read this entry &#187;’); */?>
<?php if(is_category() || is_archive() || is_home() ) {
the_excerpt();
} else {
the_content(‘Read the rest of this entry &raquo;’);
} ?>
<div class=”details”><div class=”inside”> <?php the_time(‘F j, Y’); ?> at <?php the_time(‘g:i a’); ?> – <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?> so far | <a href=”<?php the_permalink() ?>”>Read On &raquo;</a> <?php if(function_exists(‘the_views’)) { the_views(); } ?> </div></div>

去除原WP默认的旧条目,改为PAGENAV导航

<!– <?php next_posts_link(‘&laquo; old entrys’) ?>
<?php previous_posts_link(‘new entrys &raquo;’) ?> –>
<?php wp_pagenavi() ?>

\index.php

增加发布时间显示 <?php the_time(‘Y F j ‘) ?>-<?php the_time(‘g:i a’); ?>

改为摘要显示 <?php /* the_content(‘read the entry &#187;’); */ ?>
<?php if(is_category() || is_archive() || is_home() ) {
the_excerpt();
} else {
the_content(‘Read the rest of this entry &raquo;’);
} ?>
<div class=”details”><div class=”inside”>    – <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?> so far | <a href=”<?php the_permalink() ?>”>Read On &raquo;</a> <?php if(function_exists(‘the_views’)) { the_views(); } ?>  </div></div>

修改导航:<!– <?php next_posts_link(‘&laquo; old Posts’) ?>
<?php previous_posts_link(‘new Posts &raquo;’) ?>–>
<?php wp_pagenavi() ?>

\header.php

统统改用固定文字,不调用函数

<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>YippeeSoft开心软件-盛放</title>
<link rel=”stylesheet” href=”http://www.yippeesoft.com/blog/wp-content/themes/contrast-style/style.css” type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml” title=”盛放 RSS Feed” href=”http://www.yippeesoft.com/blog/feed” />
<link rel=”pingback” href=”http://www.yippeesoft.com/blog/xmlrpc.php” />
YippeeSoft开心软件-盛放<div id=”sitename”>YippeeSoft开心软件-盛放</div>

define(‘WP_CACHE’, true);
define(‘WP_POST_REVISIONS’, false);

历史博文

标签:, ,
八月 18, 2009 at 12:00 上午 by yippee 1,016 次
Category: Dev
Tags: , ,