WordPress: Using Custom Fields:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
 
(未显示同一用户的9个中间版本)
第30行: 第30行:
要添加你的"当日的心情",重复这个过程,并且添加"当日的心情"到'''关键词''',同时在'''值'''文本框中添加你的心情的描述,并且点击'''保存'''来保存文章中的这个信息。
要添加你的"当日的心情",重复这个过程,并且添加"当日的心情"到'''关键词''',同时在'''值'''文本框中添加你的心情的描述,并且点击'''保存'''来保存文章中的这个信息。


在你的下一篇文章中,你可以给你的meta-data添加一本新书和心情。在'''自定义区'''部分,'''关键'''现在显示为一个下拉列表,这个列表上有先前输入的自定义范围。选择"当前阅读"然后输入你在'''值'''中阅读的新书。点击'''添加自定义范围'''然后重复这个过程来添加"当日的心情"。
在你的下一篇文章中,你可以给你的meta-data添加一本新书和心情。在'''自定义区'''部分,'''关键词'''现在显示为一个下拉列表,这个列表上有先前输入的自定义范围。选择"当前阅读"然后输入你在'''值'''中阅读的新书。点击'''添加自定义范围'''然后重复这个过程来添加"当日的心情"。


你'''一次'''只要创建一个新的"关键词",创建好了之后,如果你想的话,你可以为每篇文章的关键词分配一个值。你可以为一篇文章的一个关键词分配几个''值''。对于那些一次阅读几本书的人们,这个功能迟早会有用的。
你'''一次'''只要创建一个新的"关键词",创建好了之后,如果你想的话,你可以为每篇文章的关键词分配一个值。你可以为一篇文章的一个关键词分配几个''值''。对于那些一次阅读几本书的人们,这个功能迟早会有用的。
==Displaying Custom Fields==


==显示自定义范围==
==显示自定义范围==
With a Custom Field added to the post, it's time to display your books and mood to the world.  To display the Custom Fields for each post, use the <tt>[[WordPress:Template_Tags/the_meta|the_meta()</tt>]] template tag. The tag must be put within [[WordPress:The Loop]] in order to work.  Many people add <tt>the_meta()</tt> template tag to the end of their post or in their [[WordPress:Post Meta Data Section]]. Here is a basic example of using the tag:


给文章添加了一个自定义范围之后,就是向世界显示你的书本和心情的时候了。要为每篇文章显示自定义范围,使用<tt>[[WordPress:Template_Tags/the_meta|the_meta()</tt>]]模板标签。标签必须放入[[WordPress:The Loop|The Loop]]中才可以运行。许多人将<tt>the_meta()</tt>模板标签添加在他们的文章的最后部分,或者添加在他们的[[WordPress:Post Meta Data Section|文章 Meta Data部分]]。下面是使用标签的一个基本的例子:
给文章添加了一个自定义范围之后,就是向世界显示你的书本和心情的时候了。要为每篇文章显示自定义范围,使用<tt>[[WordPress:Template_Tags/the_meta|the_meta()</tt>]]模板标签。标签必须放入[[WordPress:The Loop|The Loop]]中才可以运行。许多人将<tt>the_meta()</tt>模板标签添加在他们的文章的最后部分,或者添加在他们的[[WordPress:Post Meta Data Section|文章 Meta Data部分]]。下面是使用标签的一个基本的例子:
<?php the_meta(); ?>


<?php the_meta(); ?>
<?php the_meta(); ?>


It might look like this in the source code:
在源代码中,这个可能看起来像:
在源代码中,这个可能看起来像:
<pre>&lt;ul class='post-meta'&gt;
&lt;li&gt;&lt;span class='post-meta-key'&gt;Curently Reading:&lt;/span&gt; Calvin and Hobbes&lt;/li&gt;
&lt;li&gt;&lt;span class='post-meta-key'&gt;Today's Mood:&lt;/span&gt; Jolly and Happy&lt;/li&gt;
&lt;/ul&gt;</pre>
<pre>&lt;ul class='post-meta'&gt;
<pre>&lt;ul class='post-meta'&gt;
&lt;li&gt;&lt;span class='post-meta-key'&gt;Curently Reading:&lt;/span&gt; Calvin and Hobbes&lt;/li&gt;
&lt;li&gt;&lt;span class='post-meta-key'&gt;Curently Reading:&lt;/span&gt; Calvin and Hobbes&lt;/li&gt;
第64行: 第47行:




The template tag automatically puts the entire meta-data into a CSS style called <tt>post-meta</tt>. The '''key''' is in a <tt>span</tt> called <tt>post-meta-key</tt> so you can style it in your style sheet.  All of this is showcased in an unordered list.
模板标签自动地将这个的meta-data放到一个CSS样式中,称为<tt>post-meta</tt>。'''关键词'''是在一个<tt>span</tt>中,称为<tt>post-meta-key</tt>,这样你可以在你的样式表中将它设计。所有的这些内容都在一个无序的列表中得到了显示。
模板标签自动地将这个的meta-data放到一个CSS样式中,称为<tt>post-meta</tt>。'''关键词'''是在一个<tt>span</tt>中,称为<tt>post-meta-key</tt>,这样你可以在你的样式表中将它设计。所有的这些内容都在一个无序的列表中得到了显示。


To customize the look of the post-meta list, change the characteristics in your style sheet.  For instance, let's add some style to our example from the top.  The style sheet elements would look like this:


要自定义post-meta列表的外观,就要改变你的样式表的特征。例如,,让我们给上面的例子添加一些样式。样式表元素看起来像:
要自定义post-meta列表的外观,就要改变你的样式表的特征。例如,,让我们给上面的例子添加一些样式。样式表元素看起来像:


<pre>.post-meta {font-variant: small-caps; color: maroon; }
<pre>.post-meta {font-variant: small-caps; color: maroon; }
.post-meta-key {color: green; font-weight: bold; font-size: 110%; }</pre>
.post-meta-key {color: green; font-weight: bold; font-size: 110%; }</pre>
 
 
<pre>.post-meta {font-variant: small-caps; color: maroon; }
.post-meta-key {颜色: 绿色; font-weight: 粗体; 字体大小: 110%; }</pre>
 
<div style="border:1px solid blue; width:50%; margin: 20px; padding:20px">


<div style="border:1px solid blue; width:50%; margin: 20px; padding:20px">
<div style="border:1px solid blue; width:50%; margin: 20px; padding:20px">


* <span style="font-size:110%; color: green; font-weight:bold; font-variant: small-caps"> 当前阅读</span>: <span style="font-style:italic; color: maroon; font-variant: small-caps">Calvin 和 Hobbes</span>


* <span style="font-size:110%; color: green; font-weight:bold; font-variant: small-caps">Currently  Reading</span>: <span style="font-style:italic; color: maroon; font-variant: small-caps">Calvin and Hobbes</span>
* <span style="font-size:110%; color: green; font-weight:bold; font-variant: small-caps">当日心情</span>: <span style="font-style:italic; color: maroon;font-variant: small-caps">开心愉快</span>
 
* <span style="font-size:110%; 颜色: 绿色; font-weight:黑体; font-variant: small-caps">Currently  阅读</span>: <span style="font-style:italic; 颜色: 栗色; font-variant: small-caps">Calvin 和 Hobbes</span>
 
 
* <span style="font-size:110%; color: green; font-weight:bold; font-variant: small-caps">Today's Mood</span>: <span style="font-style:italic; color: maroon; font-variant: small-caps">Jolly and Happy</span>
</div>
</div>
* <span style="font-size:110%; 颜色: 绿色; font-weight:粗体; font-variant: small-caps">Today's 心情</span>: <span style="font-style:italic; 颜色: 栗色; font-variant: small-caps">开心愉快</span>
</div>
There are also many WordPress Plugins in the [http://wordpress.org/extend/plugins/ Official WordPress Plugin Directory] that add some nice features to the job of displaying meta tags. A search for [http://www.google.com/search?hl=en&q=custom+fields+plugin+wordpress&btnG=Google+Search Custom Field plugins at Google] should help you find even more.


[http://wordpress.org/extend/plugins/ 官方 WordPress 插件目录]中有许多WordPress插件,给显示meta标签增添了一些好的功能。搜索[http://www.google.com/search?hl=en&q=custom+fields+plugin+wordpress&btnG=Google+Search Google上的自定义范围插件]会帮助你找到更多的插件。
[http://wordpress.org/extend/plugins/ 官方 WordPress 插件目录]中有许多WordPress插件,给显示meta标签增添了一些好的功能。搜索[http://www.google.com/search?hl=en&q=custom+fields+plugin+wordpress&btnG=Google+Search Google上的自定义范围插件]会帮助你找到更多的插件。
==Advanced Techniques for Custom Fields==


==自定义区的高级技术==
==自定义区的高级技术==
The following are more advanced techniques for getting and customizing meta-data and custom fields.


下面是更多的关于得到并且自定义meta-data和自定义区的高级技术。
下面是更多的关于得到并且自定义meta-data和自定义区的高级技术。
===Getting Custom Fields===


===得到自定义区===
===得到自定义区===
To fetch meta values use the <tt>get_post_meta()</tt> function:


使用<tt>get_post_meta()</tt>函数,能够得到meta值:
使用<tt>get_post_meta()</tt>函数,能够得到meta值:
  get_post_meta($post_id, $key, $single);


get_post_meta($post_id, $key, $single);
get_post_meta($post_id, $key, $single);
*<tt>$post_id</tt> is the ID of the post you want the meta values for. Use <tt>$post->ID</tt> to get a post's ID.


*<tt>$post_id</tt>是mata值想指的文章的ID。使用<tt>$post->ID</tt>来得到文章的ID。
*<tt>$post_id</tt>是mata值想指的文章的ID。使用<tt>$post->ID</tt>来得到文章的ID。
*<tt>$key</tt> is a string containing the name of the meta value you want.


*<tt>$key</tt>是一个字符串,包含了你想要的meta 值的名称。
*<tt>$key</tt>是一个字符串,包含了你想要的meta 值的名称。


*<tt>$single</tt> can either be <tt>true</tt> or <tt>false</tt>. If set to true then the function will return a single result, as a '''string'''. If false, or not set, then the function returns an '''array''' of the custom fields.
*<tt>$single</tt>可以是<tt>true</tt> 或者<tt>false</tt>。如果设置为true,函数会返回一个单一的结果,作为一个'''字符串'''。如果设置为false,或者没有设置,那么函数会返回一个自定义范围的'''数组'''。
 
*<tt>$single</tt>可以是<tt>正确的</tt> 或者<tt>错误的</tt>。如果设置为正确的,函数会返回一个单一的结果,作为一个'''字符串'''。如果设置为错误的,或者没有设置,那么函数会返回一个自定义范围的'''数组'''。
 
====Implementation Details====


====执行详细信息====
====执行详细信息====
The PostMeta information is stored in a new table, <tt>$wpdb->postmeta</tt>. This table has four fields:


PostMeta信息储存在一个新的表格中,<tt>$wpdb->postmeta</tt>。这个表格有四个区:
PostMeta信息储存在一个新的表格中,<tt>$wpdb->postmeta</tt>。这个表格有四个区:
:<tt>meta_id</tt>: A unique id for each entry<br />
:<tt>post_id</tt>: The ID of the post for this metadata<br />
:<tt>meta_key</tt>: The name of the 'key'<br />
:<tt>meta_value</tt>: The value associated with the key<br />
:<tt>meta_id</tt>: 每篇文章的一个唯一的id <br />
:<tt>meta_id</tt>: 每篇文章的一个唯一的id <br />
:<tt>post_id</tt>: 这个metadata文章的ID <br />
:<tt>post_id</tt>: 这个metadata文章的ID <br />
第153行: 第88行:
:<tt>meta_value</tt>: 与关键词相关的值<br />
:<tt>meta_value</tt>: 与关键词相关的值<br />


The values from this table are pulled into a structured multi-dimensional array called <tt>$post_meta_cache</tt>, just after the <tt>$posts</tt> array is fetched in <tt>wp-blog-header.php</tt>. This variable will only contain values for the list of posts fetched for the current page build. The structure of the array will look something like this:


这个表格中的值被放进了一个称为<tt>$post_meta_cache</tt>的结构多维数组,在<tt>$posts</tt>数组被引进<tt>wp-blog-header.php</tt>之后。这个变数只包括那些寻求当前创建的网页的文章的列表的值。数组的结果可能看起来像:
这个表格中的值被放进了一个称为<tt>$post_meta_cache</tt>的结构多维数组,在<tt>$posts</tt>数组被引进<tt>wp-blog-header.php</tt>之后。这个变数只包括那些寻求当前创建的网页的文章的列表的值。数组的结果可能看起来像:
第169行: 第102行:
   ]
   ]


因此,如果你想要从文章号256中提取"reading"值,你使用这个PHP编码:




[
// 为我所阅读的内容找到一组值:
    文章id1 => [
      [
        关键词1 => [val1, val2, ...],
        关键词2 => [val1, val2, ...],
        ...
      ],
    文章id2 => [ ... ],
    ...
  ]
 
So, if you wanted to fetch the "reading" values from post number 256, you use this PHP code:
 
因此,如果你想要从文章号256中提取"阅读"值,你使用这个PHP编码:
 
  // Fetch an array of values for what I'm reading:
   $readinglist = $post_meta_cache[256]['reading'];
   $readinglist = $post_meta_cache[256]['reading'];
// 为我所阅读的内容找到一组值:
  $readinglist = $post_meta_cache[256]['阅读'];
:Don't forget that <tt>$readinglist</tt> will be an array, not a single value.


:不要忘了<tt>$readinglist</tt>会是一个数组,而不是一个单一的值。
:不要忘了<tt>$readinglist</tt>会是一个数组,而不是一个单一的值。
:As of WordPress 2.1, $post_meta_cache isn't populated anymore. Get the meta values through the functions mentioned below


:从WordPress2.1起,$post_meta_cache上不再有meta值。从下面提到的函数中得到meta值
:从WordPress2.1起,$post_meta_cache上不再有meta值。从下面提到的函数中得到meta值
===PostMeta Functions===


===PostMeta 函数===
===PostMeta 函数===
====Internal Functions====


====内部函数====
====内部函数====
These functions are intended for use inside [[WordPress:The Loop]], and all return arrays.


这些函数将在[[WordPress:The Loop|The Loop]]内部使用,而且这些函数都返回数组。
这些函数将在[[WordPress:The Loop|The Loop]]内部使用,而且这些函数都返回数组。


;<tt>[[WordPress:Function Reference/get post custom|get_post_custom()]]</tt>: Get all key/value data for the current post.


;<tt>[[WordPress:Function Reference/get post custom|得到_文章_自定义()]]</tt>:得到当前文章的所有的关键词/值数据。
;<tt>[[WordPress:Function Reference/get post custom|get_post_custom()]]</tt>:得到当前文章的所有的关键词/值数据。


;<tt>[[WordPress:Function Reference/get post custom keys|get_post_custom_keys()]]</tt>: Get a list of all key names for the current post.
;<tt>[[WordPress:Function Reference/get post custom keys|get_post_custom_keys()]]</tt>:得到当前文章的所有关键词名称的列表。


;<tt>[[WordPress:Function Reference/get post custom keys|得到_文章_自定义_关键词()]]</tt>:得到当前文章的所有关键词名称的列表。
;<tt>[[WordPress:Function Reference/get post custom values|get_post_custom_values($key)]]</tt>:得到当前文章的一个特别的关键词的值的列表。
 
;<tt>[[WordPress:Function Reference/get post custom values|get_post_custom_values($key)]]</tt>: Get the list of values for a particular key on the current post.
 
;<tt>[[WordPress:Function Reference/get post custom values|得到_文章_自定义_值($key)]]</tt>:得到当前文章的一个特别的关键词的值的列表。
 
;<tt>get_post_meta($post_id, $key, $single = false)</tt>: In WP 1.5 and beyond, this function returns the meta information without cache problems. The function requires the post id, the key, and if <tt>$single</tt> is set to TRUE, it returns only the first result (NOT as an array) for PHP use.


;<tt>get_post_meta($post_id, $key, $single = false)</tt>:在WP1.5以及更高的版本中,这个函数返回了meta信息,但是不会产生高速缓存问题。函数需要文章id,关键词,如果<tt>$single</tt>设置为真的,它只会返回PHP使用的第一个结果(不是作为一个数组)。
;<tt>get_post_meta($post_id, $key, $single = false)</tt>:在WP1.5以及更高的版本中,这个函数返回了meta信息,但是不会产生高速缓存问题。函数需要文章id,关键词,如果<tt>$single</tt>设置为真的,它只会返回PHP使用的第一个结果(不是作为一个数组)。
<pre>This will output the resulting meta value (notice the addition of "echo"):


<pre>这个会产出作为结果的meta值 (注意添加的"echo"):
<pre>这个会产出作为结果的meta值 (注意添加的"echo"):
<?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?></pre>


<?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?></pre>
<?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?></pre>
====Template Functions====


====模板函数====
====模板函数====
At the time of this writing, there is only one template function.


写这个的时候,只有一个模板函数。
写这个的时候,只有一个模板函数。


;<tt>[[WordPress:Template Tags/the_meta|the_meta()]]</tt>:Echoes an unordered list containing the current post's meta-data with a class for the UL as ''post-meta'' and the LI as ''post-meta-key''.
;<tt>[[WordPress:Template Tags/the_meta|the_meta()]]</tt>:输出一个无序的列表,这个列表包含有当前的文章的meta-data,有一类是关于UL的''post-meta''和LI的''post-meta-key''。
 
;<tt>[[WordPress:Template Tags/the_meta|the_meta()]]</tt>:Echoes一个无序的列表,这个列表包含有当前的文章的meta-data,有一类是关于UL的''post-meta''和LI的''post-meta-key''。


We expect that independent developers will come up with many interesting uses for post meta-data in the form of plugins. The <tt>the_meta()</tt> template function is just an extremely basic example.


我们期望独立的开发者能够提出许多插件形式的文章meta-data的有趣的用法。<tt>the_meta()</tt>模板函数只是一个特别的基本的例子。
我们期望独立的开发者能够提出许多插件形式的文章meta-data的有趣的用法。<tt>the_meta()</tt>模板函数只是一个特别的基本的例子。
At this time, you can only add and delete entries. The ability to modify existing entries will be implemented later.


这时,你只能够添加和删除文章。以后会给你更改当前文章的权限。
这时,你只能够添加和删除文章。以后会给你更改当前文章的权限。

2008年6月16日 (一) 15:09的最新版本

WordPress能够使文章作者给文章配置自定义区。这个任意的额外信息,称之为meta-data。这个meta-data可以包含以下的信息:

  • 情绪: 开心
  • 当前阅读: 灰姑娘
  • 聆听: 钟的摇摆
  • 天气: 闷热潮湿

拥有了一些额外的编码后,有可能归档更多的更加复杂的活动,例如使用metadata来为一篇文章储存一个有效期。

Meta-data是由关键词/值来处理的。关键词是meta-data元素的名称。是每篇单独的与这个信息相关的文章上的meta-data列表的上显示的信息,

Keys可以在每篇文章中多次使用。例如,如果你正在阅读两本不同的书(可能工作时,读一本技术方面的书,在家的时候,读一本小说),你可以创建一个"阅读"关键词并且在同一篇文章中两次都使用这个关键词,为每本书都使用一次。

出现在你的文章中的信息可能是什么样的,下面是一个例子;

当前阅读: Calvin 和 Hobbes

当日心情: 高兴愉快

用法[ ]

根据上述的例子,让我们来实施这个。我们会添加两个自定义区,一个称作"当前阅读" 另一个称作"当日的心情"。以下的指示说明会指导你怎样使用自定义区来将这个信息添加到一篇文章中。

  1. 你写了文章后,下拉到标题为自定义区的区域。
  2. 要创建一个新的称之为"当前阅读"的自定义区,在标题为关键词的文本输入区输入文本"当前阅读"(没有引号)。
  3. 新创建的关键词现在应该有一个,在这个例子中,是当前阅读的书名,"Calvin 和Hobbes"。在 区输入"Calvin and Hobbes",仍然没有引号。
  4. 点击添加自定义区按钮来将这篇文章的自定义信息保存下来。

要添加你的"当日的心情",重复这个过程,并且添加"当日的心情"到关键词,同时在文本框中添加你的心情的描述,并且点击保存来保存文章中的这个信息。

在你的下一篇文章中,你可以给你的meta-data添加一本新书和心情。在自定义区部分,关键词现在显示为一个下拉列表,这个列表上有先前输入的自定义范围。选择"当前阅读"然后输入你在中阅读的新书。点击添加自定义范围然后重复这个过程来添加"当日的心情"。

一次只要创建一个新的"关键词",创建好了之后,如果你想的话,你可以为每篇文章的关键词分配一个值。你可以为一篇文章的一个关键词分配几个。对于那些一次阅读几本书的人们,这个功能迟早会有用的。

显示自定义范围[ ]

给文章添加了一个自定义范围之后,就是向世界显示你的书本和心情的时候了。要为每篇文章显示自定义范围,使用the_meta()模板标签。标签必须放入The Loop中才可以运行。许多人将the_meta()模板标签添加在他们的文章的最后部分,或者添加在他们的文章 Meta Data部分。下面是使用标签的一个基本的例子:

<?php the_meta(); ?>

在源代码中,这个可能看起来像:

<ul class='post-meta'>
<li><span class='post-meta-key'>Curently Reading:</span> Calvin and Hobbes</li>
<li><span class='post-meta-key'>Today's Mood:</span> Jolly and Happy</li>
</ul>


模板标签自动地将这个的meta-data放到一个CSS样式中,称为post-meta关键词是在一个span中,称为post-meta-key,这样你可以在你的样式表中将它设计。所有的这些内容都在一个无序的列表中得到了显示。


要自定义post-meta列表的外观,就要改变你的样式表的特征。例如,,让我们给上面的例子添加一些样式。样式表元素看起来像:

.post-meta {font-variant: small-caps; color: maroon; }
.post-meta-key {color: green; font-weight: bold; font-size: 110%;  }
  • 当前阅读: Calvin 和 Hobbes
  • 当日心情: 开心愉快

官方 WordPress 插件目录中有许多WordPress插件,给显示meta标签增添了一些好的功能。搜索Google上的自定义范围插件会帮助你找到更多的插件。

自定义区的高级技术[ ]

下面是更多的关于得到并且自定义meta-data和自定义区的高级技术。

得到自定义区[ ]

使用get_post_meta()函数,能够得到meta值:

get_post_meta($post_id, $key, $single);

  • $post_id是mata值想指的文章的ID。使用$post->ID来得到文章的ID。
  • $key是一个字符串,包含了你想要的meta 值的名称。
  • $single可以是true 或者false。如果设置为true,函数会返回一个单一的结果,作为一个字符串。如果设置为false,或者没有设置,那么函数会返回一个自定义范围的数组

执行详细信息[ ]

PostMeta信息储存在一个新的表格中,$wpdb->postmeta。这个表格有四个区:

meta_id: 每篇文章的一个唯一的id
post_id: 这个metadata文章的ID
meta_key: '关键词'的名称
meta_value: 与关键词相关的值


这个表格中的值被放进了一个称为$post_meta_cache的结构多维数组,在$posts数组被引进wp-blog-header.php之后。这个变数只包括那些寻求当前创建的网页的文章的列表的值。数组的结果可能看起来像:

 [
   postid1 => [
     [
       key1 => [val1, val2, ...],
       key2 => [val1, val2, ...],
       ...
     ],
   postid2 => [ ... ],
   ...
 ]

因此,如果你想要从文章号256中提取"reading"值,你使用这个PHP编码:


// 为我所阅读的内容找到一组值:

 $readinglist = $post_meta_cache[256]['reading'];

:不要忘了$readinglist会是一个数组,而不是一个单一的值。

:从WordPress2.1起,$post_meta_cache上不再有meta值。从下面提到的函数中得到meta值

PostMeta 函数[ ]

内部函数[ ]

这些函数将在The Loop内部使用,而且这些函数都返回数组。


get_post_custom()
得到当前文章的所有的关键词/值数据。
get_post_custom_keys()
得到当前文章的所有关键词名称的列表。
get_post_custom_values($key)
得到当前文章的一个特别的关键词的值的列表。
get_post_meta($post_id, $key, $single = false)
在WP1.5以及更高的版本中,这个函数返回了meta信息,但是不会产生高速缓存问题。函数需要文章id,关键词,如果$single设置为真的,它只会返回PHP使用的第一个结果(不是作为一个数组)。
这个会产出作为结果的meta值 (注意添加的"echo"):

<?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?>

模板函数[ ]

写这个的时候,只有一个模板函数。

the_meta()
输出一个无序的列表,这个列表包含有当前的文章的meta-data,有一类是关于UL的post-meta和LI的post-meta-key


我们期望独立的开发者能够提出许多插件形式的文章meta-data的有趣的用法。the_meta()模板函数只是一个特别的基本的例子。

这时,你只能够添加和删除文章。以后会给你更改当前文章的权限。