编辑“WordPress:Template Tags/wp list pages

跳转至: 导航、​ 搜索
警告:您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您登录创建一个账户,您的编辑将归属于您的用户名,且将享受其他好处。

该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。

最后版本 您的文本
第77行: 第77行:


=== 根据网页顺序列出网页 ===
=== 根据网页顺序列出网页 ===
The following example lists the Pages in the order defined by the '''Page Order''' settings for each Page in the [[WordPress:Administration_Panels#Write_Page|Write]] > [[WordPress:Write_Page_SubPanel|Page]] administrative panel.


下面的例子,根据[[WordPress:Administration_Panels#Write_Page|写]] > [[WordPress:Write_Page_SubPanel|网页]] 管理面板中设置的每个网页的'''排序'''来列出网页。
下面的例子,根据[[WordPress:Administration_Panels#Write_Page|写]] > [[WordPress:Write_Page_SubPanel|网页]] 管理面板中设置的每个网页的'''排序'''来列出网页。
第89行: 第91行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('sort_column=menu_order'); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
If you wanted to sort the list by Page Order and display the word "Prose" as the list heading (in h2 style) on a Sidebar, you could add the following code to the sidebar.php file:


如果你想要根据网页顺序给列表分类,而且在工具条上显示"散文"作为列表标题(以h2样式),你可以添加以下的代码到sidebar.php文件上:
如果你想要根据网页顺序给列表分类,而且在工具条上显示"散文"作为列表标题(以h2样式),你可以添加以下的代码到sidebar.php文件上:
<div style="padding: 1em; border: 1px dashed #2f6fab;  
<div style="padding: 1em; border: 1px dashed #2f6fab;  
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
第100行: 第115行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('sort_column=menu_order&title_li=&lt;h2&gt;' . __('Prose') . '&lt;/h2&gt;' ); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
Using the following piece of code, the Pages will display without heading and in ''Page Order'':


使用下面的这些代码,网页会以''网页顺序''显示,而且还没有标题:
使用下面的这些代码,网页会以''网页顺序''显示,而且还没有标题:
第113行: 第142行:
</div>
</div>


<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('sort_column=menu_order&title_li='); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
=== Sort Pages by Post Date===
=== 根据文章日期给网页分类===
=== 根据文章日期给网页分类===
This example displays Pages sorted by (creation) date, and shows the date next to each Page list item.


这个例子显示了网页根据(创建)日期分类,而且在每个网页列表item的旁边显示了日期。
这个例子显示了网页根据(创建)日期分类,而且在每个网页列表item的旁边显示了日期。
第127行: 第170行:
</div>
</div>


<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('sort_column=post_date&show_date=created'); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
=== Exclude Pages from List ===
=== 从列表中删除网页===
=== 从列表中删除网页===
Use the '''exclude''' parameter hide certain Pages from the list to be generated by ''wp_list_pages''.  <!-- '''Note''': Page numbers must be in ascending order (i.e. <tt>'exclude=17,38'</tt> and not <tt>'exclude=38,17'</tt>).  Note this isn't true at least as 2.1.3 -->


使用'''删除'''参数隐藏''wp_list_pages''产生的列表中的某个网页。<!-- '''注''': 网页数字必须以升序=排列(例如<tt>'删除=17,38'</tt> 而不 <tt>'删除=38,17'</tt>).  注意至少这个对于2.1.3 是行不通的-->
使用'''删除'''参数隐藏''wp_list_pages''产生的列表中的某个网页。<!-- '''注''': 网页数字必须以升序=排列(例如<tt>'删除=17,38'</tt> 而不 <tt>'删除=38,17'</tt>).  注意至少这个对于2.1.3 是行不通的-->
<div style="padding: 1em; border: 1px dashed #2f6fab;  
<div style="padding: 1em; border: 1px dashed #2f6fab;  
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
第140行: 第196行:
</div>
</div>


<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('exclude=17,38' ); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
=== Include Pages in List ===
=== 在列表中包含网页===
=== 在列表中包含网页===
在一个列表中只包含某个特别的网页,例如,ID数字为35,7,26和13的网页,使用'''包含'''参数。<!--'''注''': 网页数字必须以升序排列(例如 <tt>'include=7,13,26,35'</tt> 而不是<tt>'include=35,7,26,13'</tt>)。  至少2.1.3这样的序列是行不通的-->
To include only certain Pages in the list, for instance, Pages with ID numbers 35, 7, 26 and 13, use the '''include''' parameter. <!--'''Note''': Page numbers must be in ascending order (i.e. <tt>'include=7,13,26,35'</tt> and not <tt>'include=35,7,26,13'</tt>).  this does not seem to be true at least at 2.1.3-->
在一个列表中只包含某个特别的网页,例如,ID数字为35,7,26和13的网页,使用'''包含'''参数。<!--'''注''': 网页数字必须以升序排列(例如 <tt>'包含=7,13,26,35'</tt> 而不是<tt>'包含=35,7,26,13'</tt>)。  至少2.1.3这样的序列是行不通的-->


<div style="padding: 1em; border: 1px dashed #2f6fab;  
<div style="padding: 1em; border: 1px dashed #2f6fab;  
第152行: 第220行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('包含=7,13,26,35&title_li=&lt;h2>' . __('Pages') . '&lt;/h2>' ); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
=== List Sub-Pages (versions prior to Wordpress 2.0.1)===


===列出子网页(Wordpress 2.0.1之前的版本)===
===列出子网页(Wordpress 2.0.1之前的版本)===
将这个放到<tt>the_content()</tt>后的WordPress主题的page.php 模板的<tt>the_post()</tt>部分的内部,或者将这个放到page.php模板的一个拷贝中,你为拥有子网页的网页使用这个page.php模板:
 
Put this inside the <tt>the_post()</tt> section of the page.php template of your WordPress theme after <tt>the_content()</tt>, or put it in a copy of the page.php template that you use for pages that have sub-pages:
 
将这个放到<tt>the_内容()</tt>后的WordPress主题的page.php 模板的<tt>the_文章()</tt>部分的内部,或者将这个放到page.php模板的一个拷贝中,你为拥有子网页的网页使用这个page.php模板:


<div style="padding: 1em; border: 1px dashed #2f6fab;  
<div style="padding: 1em; border: 1px dashed #2f6fab;  
第171行: 第254行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
global $id;
// teensy bit insane, sorry <br />
$date_format = '<\b\r /><\s\p\a\n '.
'\s\t\y\l\e="\f\o\n\t-\s\i\z\e: \s\m\a\l\l\e\r">'.
'\l\a\s\t\m\o\d Y-n-j</\s\p\a\n>';
wp_list_pages("title_li=&child_of=$id&show_date=modified<br />
&date_format=$date_format"); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
<span style="color:#c00;">NOTE: This example does not work with Wordpress 2.0.1 or newer if placed in a page template because the global $id is not set. Use the following code</span>


<span style="color:#c00;">注:如果这个例子放到了一个网页模板中,在WordPress2.0.1或者更新的版本中不能够运行,因为没有设置全局$id。使用下面的代码</span>
<span style="color:#c00;">注:如果这个例子放到了一个网页模板中,在WordPress2.0.1或者更新的版本中不能够运行,因为没有设置全局$id。使用下面的代码</span>
=== List Sub-Pages (Wordpress 2.0.1 or newer)===


=== 列出子网页 (Wordpress 2.0.1 或者更新的版本)===
=== 列出子网页 (Wordpress 2.0.1 或者更新的版本)===
NOTE: Requires an HTML tag (either <tt><nowiki><ul></nowiki></tt> or <tt><nowiki><ol></nowiki></tt>) even if  there are no subpages. Keep this in mind if you are using css to style the list.


注意:即使没有子网页,也需要一个HTML标签(<tt><nowiki><ul></nowiki></tt> 或者<tt><nowiki><ol></nowiki></tt>)。当你使用css设计列表的时候,要牢记这一点。
注意:即使没有子网页,也需要一个HTML标签(<tt><nowiki><ul></nowiki></tt> 或者<tt><nowiki><ol></nowiki></tt>)。当你使用css设计列表的时候,要牢记这一点。
第188行: 第295行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;ul&gt; <br />
&lt;?php<br />
wp_list_pages('title_li=&child_of='.$post->ID.'&show_date=modified<br />
&date_format=$date_format'); ?&gt; <br />
&lt;/ul&gt;
</tt>
</div>
The following example will generate a list only if there are child (Pages that designate the current page as a Parent) for the current Page:


只有当前的网页拥有子网页的时候,下面的例子才会产生一个列表(子网页是指定当前网页为母网页的网页):
只有当前的网页拥有子网页的时候,下面的例子才会产生一个列表(子网页是指定当前网页为母网页的网页):
第203行: 第324行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;?php<br />
$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');<br />
if ($children) { ?&gt; <br />
&lt;ul&gt; <br />
&lt;?php echo $children; ?&gt; <br />
&lt;/ul&gt; <br />
&lt;?php } ?&gt;
</tt>
</div>
=== List subpages even if on a subpage ===


=== 即使没有子网页,也列出子网页 ===
=== 即使没有子网页,也列出子网页 ===


上述的例子指示显示了来自于母网页的子网页,但是并不是真正地在一个子网页上,这个代码会显示子网页,而且只有子网页在母网页上或者在其中的一个子网页上时,才会显示。
The above examples will only show the children from the parent page, but not when actually on a child page.  This code will show the child pages, and only the child pages, when on a parent or on one of the children.
 
上述的例子指示显示了来自于母网页的子网页,但是并不是真正地在一个子网页上,这个代码会显示子网页,而且只有子网页在母网页上或者在其中的一个子网页上时,参会显示。
 
** warning ** This code will not work if placed after a widget block in the sidebar.
 


** 警醒 ** 如果将这个代码放到一个工具条上的一个widget 块上时,这个代码就不会运行。
** 警醒 ** 如果将这个代码放到一个工具条上的一个widget 块上时,这个代码就不会运行。
第225行: 第366行:
</tt>
</tt>
</div>
</div>
<div style="padding: 1em; border: 1px dashed #2f6fab;
color: Black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.9em;">
<tt>
&lt;?php<br />
if($post->post_parent)<br />
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
else<br />
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");<br />
if ($children) { ?&gt;<br />
&lt;ul&gt; <br />
&lt;?php echo $children; ?&gt; <br />
&lt;/ul&gt; <br />
&lt;?php } ?&gt;
</tt>
</div>
=== Markup and styling of page items ===


=== 网页items的标记和样式===
=== 网页items的标记和样式===


默认情况下,'''wp_list_pages()'''产生一个无序的,嵌套的WordPress[[WordPress:Pages|网页]],这个网页是用[[WordPress:Administration_Panels#Write_Page|写]] > [[WordPress:Write_Page_SubPanel|网页]]管理面板创建的。你可以通过将<var>title_li</var>参数设置为一个空字符串,可以移除最外面的item(<tt>li.pagenav</tt>)并且列出(<tt>ul</tt>)。
By default, '''wp_list_pages()''' generates a nested, unordered list of WordPress [[WordPress:Pages]] created with the [[WordPress:Administration_Panels#Write_Page|Write]] > [[WordPress:Write_Page_SubPanel|Page]] admin panel. You can remove the outermost item (<tt>li.pagenav</tt>) and list (<tt>ul</tt>) by setting the <var>title_li</var> parameter to an empty string.
 
默认情况下,'''wp_列表_网页()'''产生一个无序的,嵌套的WordPress[[WordPress:Pages|网页]],这个网页是用[[WordPress:Administration_Panels#Write_Page|写]] > [[WordPress:Write_Page_SubPanel|网页]]管理面板创建的。你可以通过将<var>title_li</var>参数设置为一个空字符串,可以移除最外面的item(<tt>li.pagenav</tt>)并且列出(<tt>ul</tt>)。
 
All list items (<tt>li</tt>) generated by '''wp_list_pages()''' are marked with the class <tt>page_item</tt>. When '''wp_list_pages()''' is called while displaying a Page, the list item for that Page is given the additional class <tt>current_page_item</tt>.


'''wp_list_pages()'''产生的所有的列表items(<tt>li</tt>)都标记了class <tt>page_item</tt>。当显示网页的时候,调用了'''wp_list_pages()''',关于那个网页的列表item会得到额外的class<tt>current_page_item</tt>。
'''wp_列表_网页()'''产生的所有的列表items(<tt>li</tt>)都标记了class <tt>page_item</tt>。当显示网页的时候,调用了'''wp_list_pages()''',关于那个网页的列表item会得到额外的class<tt>当前_网页_item</tt>。


<pre>
<pre>
第251行: 第415行:
</pre>
</pre>


<pre>
<li class="pagenav">
  Pages
  <ul>
    <li class="page_item current_page_parent">
      [parent of the current page]
      <ul>
        <li class="page_item current_page_item">
          [the current page]
        </li>
      </ul>
    </li>
    <li class="page_item">
      [another page]
    </li>
  </ul>
</li>
</pre>
They can be styled with [[WordPress:Glossary#CSS|CSS selectors]]:
这些可以用[[WordPress:Glossary#CSS|CSS 选择器]]设计:
这些可以用[[WordPress:Glossary#CSS|CSS 选择器]]设计:
  .pagenav { ... }
  .page_item { ... }
  .current_page_item { ... }
  .current_page_parent { ... }


   .pagenav { ... }
   .pagenav { ... }
第258行: 第447行:
   .current_page_parent { ... }
   .current_page_parent { ... }


== Parameters ==
== 参数==
== 参数==
; '''sort_column''' (''string''):以许多不同的方式给列出的网页分类。默认设置为''根据网页标题的字母顺序分类''。
; '''sort_column''' (''string''):Sorts the list of Pages in a number of different ways. The default setting is ''sort alphabetically by Page title''.
 
; '''分类_column''' (''string''):以许多不同的方式给列出的网页分类。默认设置为''根据网页标题的字母顺序分类''。
 
:* <tt>'post_title'</tt> - Sort Pages alphabetically (by title) – default
 
:* <tt>'文章_标题'</tt> -(根据标题)将网页按照字母顺序分类-默认
 
:* <tt>'menu_order'</tt> - Sort Pages by Page Order. ''N.B.'' Note the difference between ''Page Order'' and ''Page ID''. The Page ID is a unique number assigned by WordPress to every post or page. The Page Order can be set by the user in the [[WordPress:Write_Page_SubPanel|Write>Pages]] administrative panel. See the [[WordPress:#List Pages by Page Order|example]] below.


:* <tt>'post_title'</tt> - (根据标题)将网页按照字母顺序分类-默认
:* <tt>'menu_顺序'</tt> -根据网页顺序给网页分类。''N.B.'' 注意''网页顺序'' 和''网页 ID''之间的区别。网页ID是一个独特的数字,是由WordPress指定给每篇文章或者每个网页的。用户可以在[[WordPress:Write_Page_SubPanel|写>网页]]管理面板上设置网页顺序。请看看下面的[[WordPress:#List Pages by Page Order|例子]]。


:* <tt>'menu_order'</tt> -根据网页顺序给网页分类。''N.B.'' 注意''Page Order'' 和''Page ID''之间的区别。网页ID是一个独特的数字,是由WordPress指定给每篇文章或者每个网页的。用户可以在[[WordPress:Write_Page_SubPanel|写>网页]]管理面板上设置网页顺序。请看看下面的[[#WordPress:List Pages by Page Order|例子]]
:* <tt>'post_date'</tt> - Sort by creation time.
:* <tt>'post_modified'</tt> - Sort by time last modified.
:* <tt>'ID'</tt> - Sort by numeric Page ID.
:* <tt>'post_author'</tt> - Sort by the Page author's numeric ID.
:* <tt>'post_name'</tt> - Sort alphabetically by Post [[WordPress:Glossary#Slug|slug]].
----


:* <tt>'post_date'</tt> - 根据创建时间分类。
:* <tt>'文章_日期'</tt> - 根据创建时间分类。
:* <tt>'post_modified'</tt> - 根据最后一次更改分类。
:* <tt>'更改的_文章'</tt> - 根据最后一次更改分类。
:* <tt>'ID'</tt> - 根据网页ID分类。
:* <tt>'ID'</tt> - 根据网页ID分类。
:* <tt>'post_author'</tt> -根据网页作者的 ID分类。
:* <tt>'文章_作者'</tt> - 根据网页作者的 ID分类。
:* <tt>'post_name'</tt> - 根据文章的[[WordPress:Glossary#Slug|slug]],按字母顺序分类。
:* <tt>'文章_名称'</tt> - 根据文章的[[WordPress:Glossary#Slug|slug]],按字母顺序分类。
----
----
''':''' '''sort_column'''参数可以用来给列出的网页分类,根据WordPress数据库的[[WordPress:Database Description#Table:_wp_posts|wp_post table]]的任何栏中的描述符来给文章分类。这里列出了一些有用的例子。
 
'''Note:''' The '''sort_column''' parameter can be used to sort the list of Pages by the descriptor of any field in the [[WordPress:Database Description#Table:_wp_posts|wp_post table]] of the WordPress database. Some useful examples are listed here.
----
----


; '''sort_order''' (''string''):更改列出的网页的分类顺序(升序的或者降序的)。默认为''升序的'',有效的参数值:
'''注:''' '''sort_column'''参数可以用来给列出的网页分类,根据WordPress数据库的[[WordPress:Database Description#Table:_wp_posts|wp_文章 表格]]的任何栏中的描述符来给文章分类。这里列出了一些有用的例子。
----
 
; '''sort_order''' (''string''):Change the sort order of the list of Pages (either ascending or descending). The default is ''ascending''. Valid values:
 
; '''分类_顺序''' (''string''):更改列出的网页的分类顺序(升序的或者降序的)。默认为''升序的'',有效的参数值:
 
:* <tt>'asc'</tt> - Sort from lowest to highest (Default).
:* <tt>'desc'</tt> - Sort from highest to lowest.


:* <tt>'asc'</tt> -从最低到最高分类 (默认)。.
:* <tt>'asc'</tt> -从最低到最高分类 (默认)。.
:* <tt>'desc'</tt> - 从最高到最低分类。
:* <tt>'desc'</tt> - 从最高到最低分类。


; '''exclude''' (''string''):默认用逗号将需要从列表上删除的网页的ID分开(例如:<tt>'exclude=3,7,31'</tt>)。没有默认参数值。请看看下面的例子[[#WordPress:Exclude Pages from List|从列表中删除网页]]。
; '''exclude''' (''string''):Define a comma-separated list of Page IDs to be excluded from the list (example: <tt>'exclude=3,7,31'</tt>). There is no default value. See the [[WordPress:#Exclude Pages from List|Exclude Pages from List]] example below.
 
; '''删除''' (''string''):默认用逗号将需要从列表上删除的网页的ID分开(例如:<tt>'删除=3,7,31'</tt>)。没有默认参数值。请看看下面的例子[[WordPress:#Exclude Pages from List|从列表中删除网页]]。
 
; '''include''' (''string''):Only include certain Pages in the list generated by ''wp_list_pages''. Like '''exclude''', this parameter takes a comma-separated list of Page IDs. There is no default value. See the [[WordPress:#Include Pages in List|Include Pages in List]] example below.
 
; '''包含''' (''string''):在''wp_列表_网页''产生的列表上只包含特别的网页。像'''删除''',这个参数拥有一个用逗号分开的网页ID列表。没有默认参数值。请看看[[WordPress:#Include Pages in List|在一个列表中包含网页]]下面的例子。


; '''include''' (''string''):''wp_list_pages''产生的列表上只包含特别的网页。像'''删除''',这个参数拥有一个用逗号分开的网页ID列表。没有默认参数值。请看看[[#WordPress:Include Pages in List|在一个列表中包含网页]]下面的例子。
; '''depth''' (''integer''):This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by ''wp_list_pages''. The default value is ''0'' (display all pages, including all sub-pages).
 
; '''层级''' (''整数''):这个参数控制了''wp_列表_网页''产生的列表中可以包含多少层级的网页。默认值为''0''(显示所有的网页,包括子网页)。
 
:* <tt>0</tt>  - Pages and sub-pages displayed in hierarchical (indented) form (Default).


; '''depth''' (''integer''):这个参数控制了''wp_list_pages''产生的列表中可以包含多少层级的网页。默认值为''0''(显示所有的网页,包括子网页)。
:* <tt>0</tt>  -以层级(嵌套)方式(默认)显示的网页和子网页。
:* <tt>0</tt>  -以层级(嵌套)方式(默认)显示的网页和子网页。
:* <tt>-1</tt> - Pages in sub-pages displayed in flat (no indent) form.
:* <tt>-1</tt> -子网页中的网页以flat(非嵌套)的方式显示。
:* <tt>-1</tt> -子网页中的网页以flat(非嵌套)的方式显示。
:* <tt>1</tt>  - Show only top level Pages
:* <tt>1</tt>  -只显示最高级别的网页
:* <tt>1</tt>  -只显示最高级别的网页
:* <tt>2</tt>  - Value of 2 (or greater) specifies the depth (or level) to descend in displaying Pages.
:* <tt>2</tt>  -值为2(或者更高)规定了显示网页时,可以下降的层次(或者层级)。
:* <tt>2</tt>  -值为2(或者更高)规定了显示网页时,可以下降的层次(或者层级)。
   
   
; '''child_of''' (''integer''):只显示一个单独网页的子网页;为一个网页使用ID作为参数值。默认为''0''(显示所有网页)。
; '''child_of''' (''integer''):Displays the sub-pages of a single Page only; uses the ID for a Page as the value. Defaults to ''0'' (displays all Pages).


; '''child_of''' (''整数''):只显示一个单独网页的子网页;为一个网页使用ID作为参数值。默认为''0''(显示所有网页)。


; '''show_date''' (''string''):在每个网页的旁边显示创建或者最后更改的日期。默认值为''零''(不显示日期)。有效的参数值:
; '''show_date''' (''string''):Display creation or last modified date next to each Page. The default value is the ''null value'' (do not display dates). Valid values:
 
; '''显示_日期'''(''string''):在每个网页的旁边显示创建或者最后更改的日期。默认值为''零''(不显示日期)。有效的参数值:
 
:* <tt>'<nowiki></nowiki>'</tt> - Display no date (Default).


:* <tt>'<nowiki></nowiki>'</tt> -不显示日期(默认)。
:* <tt>'<nowiki></nowiki>'</tt> -不显示日期(默认)。


:* <tt>'modified'</tt> - 显示最后更改的日期。
:* <tt>'modified'</tt> - Display the date last modified.
 
:* <tt>'更改的'</tt> -显示最后更改的日期。
 
:* <tt>'xxx'</tt> - Any value other than ''modified'' displays the date ('''post_date''') the Page was first created. See the [[WordPress:#Sort Pages by Post Date|example]] below.
 
:* <tt>'xxx'</tt> -除了''modified''的任何参数值显示了网页首次创建时的日期('''文章_日期''')。请看看下面的[[WordPress:#Sort Pages by Post Date|例子]]。


:* <tt>'xxx'</tt> - 除了''modified''的任何参数值显示了网页首次创建时的日期('''文章_日期''')。请看看下面的[[#WordPress:Sort Pages by Post Date|例子]]
; '''date_format''' (''string''):Controls the format of the Page date set by the '''show_date''' parameter (example: "<tt><nowiki>l, F j, Y</nowiki></tt>"). This parameter defaults to the date format configured in your WordPress options. See [[WordPress:Formatting Date and Time]] and the [http://php.net/date date format page on the php web site].


; '''date_format''' (''string''):控制了'''show_date'''参数设置的网页日期格式(例如:"<tt><nowiki>l, F j, Y</nowiki></tt>")。这个参数默认日期格式为配置在WordPress上的选项。请看看[[WordPress:Formatting Date and Time|日期和时间格式]]和[http://php.net/date php 网站上的日期格式网页]
; '''数据_格式''' (''string''):控制了'''显示_日期'''参数设置的网页日期格式(例如:"<tt><nowiki>l, F j, Y</nowiki></tt>")。这个参数默认日期格式为配置在WordPress上的选项。请看看[[WordPress:Formatting Date and Time|日期和时间格式]]和[http://php.net/date php 网站上的日期格式网页]


; '''title_li''' (''string''):设置网页列表的标头的文本和样式。默认为<tt>'__('Pages')'</tt>,显示了"网页"(为[[WordPress:Localization|本地化目的]]使用<tt>__(&#039;&#039;)</tt>)。如果传递了一个零或者空的参数值,(<tt>&#039;&#039;</tt>),不显示任何标题,而且列表也不会外包上<tt>&lt;ul>, &lt;/ul></tt>标签。请看看关于[[#WordPress:Hiding or Changing the List Heading|标头]]的例子。
; '''title_li''' (''string''):Set the text and style of the Page list's heading. Defaults to <tt>'__('Pages')'</tt>, which displays "Pages" (the <tt>__(&#039;&#039;)</tt> is used for [[WordPress:Localization|localization purposes]]). If passed a null or empty value (<tt>&#039;&#039;</tt>), no heading is displayed, and the list will not be wrapped with <tt>&lt;ul>, &lt;/ul></tt> tags. See the example for [[WordPress:#Hiding or Changing the List Heading|Headings]].
 
; '''title_li''' (''string''):设置网页列表的标头的文本和样式。默认为<tt>'__('网页')'</tt>,显示了"网页"(为[[WordPress:Localization|本地化目的]]使用<tt>__(&#039;&#039;)</tt>)。如果传递了一个零或者空的参数值,(<tt>&#039;&#039;</tt>),不显示任何标题,而且列表也不会外包上<tt>&lt;ul>, &lt;/ul></tt>标签。请看看关于[[WordPress:#Hiding or Changing the List Heading|标头]]的例子。
 
; '''echo''' (''boolean''):Toggles the display of the generated list of links or return the list as an HTML text string to be used in PHP. The default value is ''1'' (display the generated list items). Valid values:
:* <tt>1 (true)</tt> - default
:* <tt>0 (false)</tt>


; '''echo''' (''boolean''):Toggles链接产生的列表的显示或者返回链接作为HTML文本字符串,用于PHP。默认值为''1''(显示产生的列表item)。有效的参数值:
; '''echo''' (''boolean''):Toggles链接产生的列表的显示或者返回链接作为HTML文本字符串,用于PHP。默认值为''1''(显示产生的列表item)。有效的参数值:
:* <tt>1 (true)</tt> - 默认
:* <tt>1 (正确的)</tt> - 默认
:* <tt>0 (false)</tt>
:* <tt>0 (错误的)</tt>
 
; hierarchical : (''boolean'') Display sub-Pages in an indented manner below their parent or list the Pages inline.  The default is ''true'' (display sub-Pages indented below the parent list item). Valid values:


; hierarchical : (''boolean'') 在母网页下,以嵌套的方式显示子网页,或者列出网页inline。默认为''真的''(显示嵌套在母列表item下面的子网页)。有效的参数值:
;层级的:(''boolean'')在母网页下,以嵌套的方式显示子网页,或者列出网页inline。默认为''真的''(显示嵌套在母列表item下面的子网页)。有效的参数值:


:* <tt>1 (true)</tt> - default
:* <tt>1 (true)</tt> - default
:* <tt>0 (false)</tt>
:* <tt>0 (false)</tt>
:* <tt>1 (正确的)</tt> - 默认
:* <tt>0 (错误的)</tt>
; meta_key : (''string'') Only include the Pages that have this Custom Field Key (use in conjunction with the meta_value field).


; meta_key : (''string'')只包含拥有这个自定义Field Key的网页(和meta_value field用在一起)。
; meta_key : (''string'')只包含拥有这个自定义Field Key的网页(和meta_value field用在一起)。
; meta_value : (''string'') Only include the Pages that have this Custom Field Value (use in conjuntion with the meta_key field).


; meta_value : (''string'') 只包含拥有这个自定义Field Key参数值的网页(和meta_key field用在一起)。
; meta_value : (''string'') 只包含拥有这个自定义Field Key参数值的网页(和meta_key field用在一起)。
== Related ==
{{Tag General Tags}}
{{Query String Tag Footer}}
{{Copyedit}}


== 相关的 ==
== 相关的 ==
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅Wordpress-mediawiki:版权的细节)。 未经许可,请勿提交受版权保护的作品!
取消 编辑帮助(在新窗口中打开)