WordPress 日志修订功能

 

WordPress 2.6 有个功能叫做日志修订,我觉得对很有用。 不过每个修订都会在 posts 表中插入一条记录,有时多修改了几次,1个post就有10多个修订版本。这样每片日志都有10多条记录在 posts 表中,文章一多,表都要爆了。数据一多,查询肯定慢,WordPress 的效率已经很低了,再加上这个简直没法用。

发现其实 WordPress 已经留了接口。在 wp-setting.php 中新增了一个变量 WP_POST_REVISIONS,把它设置为 false 就可以屏蔽 WordPress 日志修订功能。在 wp-config.php 添加的代码如下:

define('WP_POST_REVISIONS', false);

 

关于 WP_POST_REVISIONS 这个变量的详细设置为:

  • true(默认)或者 -1:保存所有修订版本
  • false 或者 0:不保存任何版本(除了自动保存的版本)
  • 大于 0 的整数 n:保存 n 个修订版本(+1 只保存自动保存版本),旧的版本将被删除。
July 16th, 2008 | Leave a Comment

Blue Weed

a clean and crisp look with light blue colors fit for almost any blog.

Gravatar-ready

WP2.5 Gallery-ready

Widget-ready

includes tabbed sections for easy access to your content

July 15th, 2008 | Leave a Comment

Embed Google Ad in First WordPress Post

  1. Open the WordPress admin control panel and navigate to:
    Presentation > Theme Editor
  2. Select the Main Index Template from the list of templates on the right.
  3. In the Main Index Template, find the line that starts with:
    <?php if (have_posts())
  4. Add the following line above it:
    <?php $count = 1; ?>
  5. Next, find the line that starts with:
    <?php the_content
  6. After the closing tag ?> for that section (it may wrap to multiple lines), add the following code:
  7. <?php if ($count == 1) : ?>
    – Insert your Google AdSense code here –
    <?php endif; $count++; ?>
  8. Click Update File.

Embed Google Ad in First WordPress Post

July 15th, 2008 | Leave a Comment

Import Blogger Posts to Wordpress

TechCounter - TechNews, Money & SEO » Import Blogger Beta Posts to WordPress

A couple of guys have posted in the comments section that when they try to import from blogger they see a 0/0 posts or 0/0 comments.

Step # 1: In your Blogger account, Click Formatting and change the Timestamp format to be mm/dd/yyyy hh:mm:ss AM/PM which is the first choice in the dropdown menu

Step # 2: Click Archiving and set Archive Frequency to Monthly

Step # 3: Come back to your wordpress.com blog and hit “Clear Account Information” first.

Start importing

(Thanks Jim and RobJKentJr)

Powered by ScribeFire.

January 14th, 2008 | Leave a Comment

我目前使用的Wordpress Plugin列表

January 14th, 2008 | 1 Comment

Deep Blue Wordpress Theme

deepblue125x125.jpg

我目前采用的 Wordpress 主题。

三栏,AD Block,页面,搜索。

2008/1/1~

The theme is available in three versions, with the sidebar on the right side, with the sidebar on the left side and with 125×125 ad blocks. Below you will find the download links:

Deep Blue Wordpress Theme Released

January 1st, 2008 | Leave a Comment

Powered by WordPress | Blue Weed by Blog Oh! Blog | Entries (RSS) and Comments (RSS).