开发者 | westi |
---|---|
更新时间 | 2011年6月30日 19:43 |
捐献地址: | 去捐款 |
PHP版本: | 2.0 及以上 |
WordPress版本: | 3.1 |
child_of
is used to add a WHERE to the database query to limit the pages returned to those with a post_page equal to the argument provided.
The query argument child_limit
is used to limit the number of pages returned.
The query argument child_offset
is used to offset the limiting to allow for pagination if required.
wp-content/plugins/
The plugin is used when you call query_posts() from a theme template file so as to run your own query. The following code is an example of what you could do to generate a list of the first 10 child pages from a parent page: ` : `
If you want to create a hierarchical display with children of children then you will need to use nested loops which requires some care. You will need to have the most up-to-date version of this plugin and then you can use the examples which are included with it in the page-templates folder. The basic loops needed for a nested solution are as follows: ` have_posts()) : $inner_query->the_post(); ?> : `
If you want to set an excerpt for a page then you need to install my Page Excerpt plugin and this will add an excerpt box to the "Edit Page" so that you can enter one. This plugin can be found here: http://wordpress.org/extend/plugins/pjw-page-excerpt/