文章列表

wordpress的存档

正确使用WEB标准建立html文档基本模板如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
    <meta http-equiv="Content-Language" content="gb2312" />
    <meta content="all" name="robots" />
    <meta name="author" content="网站作者,可以添加网址或者邮箱" />
    <meta name="Copyright" content="网站地址,版权说明" />
    <meta name="description" content="网站性质描述" />
    <meta name="keywords"content="关键字列表,用逗号分割" />
    <link rel="icon" href="ico图片文件url" mce_href="ico图片文件url" type="image/x-icon" />
    <link rel="shortcut icon" href="ico图片文件url" mce_href="ico图片文件url" type="image/x-icon" />
    <link rel="stylesheet" rev="stylesheet" href="css文件url" mce_href="css文件url" type="text/css" media="all" />
    <title>模板</title>
  </head>
  <body>
    
  </body>
</html>

上面的关键点有下面几个方面: 阅读全文>>

推荐(0)
收藏

meta是用来在HTML文档中模拟HTTP协议的响应头报文。meta 标签用于网页的<head>与</head>中,meta 标签的用处很多。meta 的属性有两种:name和http-equiv。name属性主要用于描述网页,对应于content(网页内容),以便于搜索引擎机器人查找、分类(目前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给网页分类)。这其中最重要的是description(站点在搜索引擎上的描述)和keywords(分类关键词),所以应该给每页加一个meta值。比较常用的有以下几个:

name 属性

  1、<meta name="Generator" contect="">用以说明生成工具(如Microsoft FrontPage 4.0)等;

  2、<meta name="KEYWords" contect="">向搜索引擎说明你的网页的关键词;

  3、<meta name="DEscription" contect="">告诉搜索引擎你的站点的主要内容;

  4、<meta name="Author" contect="你的姓名">告诉搜索引擎你的站点的制作的作者;

  5、<meta name="Robots" contect= "all|none|index|noindex|follow|nofollow">

  其中的属性说明如下:

阅读全文>>

推荐(0)
收藏

wordpress有时会出现由于服务器设置造成的小问题,需要对其中的某些文件进行修改:

  • wordpress无法正确读取来访者(评论)IP由于服务器的某些缓存技术,有些系统无法被正确读取来访者的IP,评论的IP均显示为服务器本身的地址,解决方法是将下列文件:
    \wp-includes\comment.php
    \wp-includes\class-phpmailer.php
    中的变量_SERVER["REMOTE_ADDR"]替换为_SERVER["HTTP_X_FORWARDED_FOR"](或_SERVER['REMOTE_ADDR']替换为_SERVER['HTTP_X_FORWARDED_FOR']要特别注意这里的引号!)
  • wordpress中文版无法正常显示在使用Php5.x的版本中,中文版的wordpress会无法正常加载中文包,直接调用函数显示的地方如存档、评论等的中文名字会变英文,后台也全部是英文,解决方法是将下面文件:
    \wp-includes\gettext.php
    中的代码

    1. if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
    2.       $this->BYTEORDER = 0;
    3.     } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF))

    修改为

    1. if ($magic == $MAGIC1) { 
    2. $this->BYTEORDER = 0;
    3. } elseif ($magic == $MAGIC2) {

      

  • 推荐(0)
    收藏

    <?php
    wp_list_cats("sort_column=name&optioncount=1&feed=RSS");
    ?>

    这句就是告诉它分类要依照名称排序、并显示拥有的文章数量、而且分类要显示分类RSS连结。各个自设选项列表如下 阅读全文>>

    推荐(0)
    收藏

    WordPress 2.3.2 is an urgent security release that fixes a bug that can be used to expose your draft posts. 2.3.2 also suppresses some error messages that can give away information about your database table structure and limits and stops some information leaks in the XML-RPC and APP implementations. Get 2.3.2 now to protect your blog from these disclosures. As a little bonus, 2.3.2 allows you to define a custom DB error page. Place your custom template at wp-content/db-error.php. If WP has a problem connecting to your database, this page will displayed rather than the default error message. For more detail on what’s new in 2.3.2, view the list of fixed bugs and see the changes between 2.3.1 and 2.3.2. Special thanks to Alex Concha for his help on this release.

    That's fun! I just have a try!

    推荐(0)
    收藏

    Simple Tags绝对是目前为止最为好用的wordpress tag插件,可以说它汇聚了以往tag相关插件的种种优点,集百家之长于一身,是目前绝对不可以缺少的wordpress插件之一。上次在wordpress 2.3插件推荐中提到的WP 2.3 Related Posts和Tag Managing Thing现在已经不需要再安装了,只需要Simple Tags一个插件就可以实现多种功能。

    目前Simple Tags支持的功能有:

    推荐(0)
    收藏