Linux 软件免费装

PJW Query Child Of

开发者 westi
更新时间 2011年6月30日 19:43
捐献地址: 去捐款
PHP版本: 2.0 及以上
WordPress版本: 3.1

标签

page query child

下载

0.01 0.02 1.00 1.10

详情介绍:

This plugin allows you to run loops within your WordPress templates where you query for children of the current page. The plugin extra arguments to the list of arguments supported by query_posts(). The query argument 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.

安装:

  1. Upload to your plugins folder, usually wp-content/plugins/
  2. Activate the plugin on the plugin screen.
  3. Use the new query variables in calls to query_posts()

常见问题:

How can I use this in a page template?

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: ` : `

How can I create a a page template which lists children of children?

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(); ?> : `

How do I set an excerpt for a Page?

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/

更新日志:

v0.01 v0.02 v1.00 v1.10