Linux 软件免费装
Banner图

DK List Child Pages Shortcode

开发者 douglaskarr
更新时间 2026年11月26日 05:00
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcode page list subpages child pages parent page

下载

1.0.0 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.4.0 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4

详情介绍:

DK List Child Pages Shortcode adds a [listchildpages] shortcode that lists the child pages of the current page, or of any page you choose, as a simple linked list. Each item can show the page's featured image and excerpt. Usage The shortcode is [listchildpages]...[/listchildpages]. [dknm_list_child_pages] works the same way. It accepts several attributes: Examples: Example 1: Order the child pages by publish date in descending order: [listchildpages aclass="" ifempty="No child pages" orderby="publish_date" order="desc" displayimage="no"] Here are our child pages: [/listchildpages] Example 2: Order the child pages by title in ascending order with the page's featured image aligned left: [listchildpages orderby="title" order="asc" displayimage="yes" align="alignleft"] Here are our child pages: [/listchildpages] Example 3: Target a specific parent page by ID and use medium-sized images: [listchildpages parent="123" displayimage="yes" size="medium"] Resources [/listchildpages] Example 4: Target a parent page by slug and show full-size featured images: [listchildpages parent="about/company" displayimage="yes" size="full"] Team Sections [/listchildpages] Example 5: Follow the page order set under Page Attributes: [listchildpages orderby="menu_order"] Chapters [/listchildpages] Example 6: Explicitly set the parent as the current page and use large images: [listchildpages parent="current" displayimage="yes" size="large"] Subpages [/listchildpages] Developer filters Built by DK New Media. Visit Martech Zone for updates on this plugin and other marketing tools.

安装:

  1. In your WordPress admin, go to Plugins > Add New, search for "DK List Child Pages Shortcode", and select Install Now. Or upload the list-child-pages-shortcode folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen.
  3. Edit a parent page and add [listchildpages] where the list should appear.
  4. Optional: add an excerpt and featured image to each child page to show them in the list.

屏幕截图:

  • The published list of child pages with featured images and excerpts (Twenty Twenty-Five, with a few lines of theme CSS for the thumbnails).

升级注意事项:

1.6.4 The display name is now DK List Child Pages Shortcode. Nothing changes functionally; existing shortcodes and settings keep working. 1.6.3 Author and documentation links now include campaign tracking. No shortcode changes. 1.6.2 New WordPress.org banner and animated icon, and an uninstall.php cleanup routine. No shortcode changes. 1.6.1 Fixes code example formatting on the WordPress.org plugin page. 1.6.0 Fixes menu_order sorting. Existing shortcodes keep working. 1.5.1
  • Marks the plugin tested with WordPress 7.1, aligns the stable version, and adds optional orderby/displayimage aliases without changing default output.
1.4.0
  • New parent and size attributes. Backward-compatible. Please review usage examples.
1.3.1
  • Tested in latest versions of WordPress
1.3.0
  • Added more options!
1.2.2
  • Corrected an undeclared variable error.
1.2.1
  • Added documentation on where you can see all of the order and orderby parameters.
1.2.0
  • Added another shortcode option for the order. Default is DESC.
1.1.0
  • Added another shortcode option for the order. Default is publish_date.
1.0.0
  • Initial Release

常见问题:

How can I add a description for each child page?

Edit the child page and you'll find an excerpt section where you can enter a description that will be published on the list.

How can I enable featured images on my site?

Within your functions.php file, look for the add_theme_support post-thumbnails line and add page to the array. Or if you don't have that line, you can just add it: add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );

How can I modify the output?

There are additional class fields for the unordered list tag (ulclass), list item tag (liclass), and the anchor tag (aclass). You can modify the output utilizing your theme's CSS.

How do I list child pages in my own order?

Set the Order number under Page Attributes on each child page (1, 2, 3...), then use [listchildpages orderby="menu_order"]. Since 1.6.0 this sorts lowest number first. Add order="desc" to reverse it.

I updated to 1.6.0. Do I need to change my shortcodes?

No. [listchildpages] and every attribute work as before. The only change in output is that orderby="menu_order" without an order attribute now sorts ascending, which matches the order shown in WordPress.

What happens if I deactivate or uninstall the plugin?

The plugin stores nothing in the database. An uninstall.php file defensively removes any leftover dknm_lcp_ or legacy dklcp_ options or transients if they were ever created. Your pages, excerpts, and featured images are not changed. Shortcodes left in content will simply stop rendering until the plugin is activated again.

更新日志:

1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.1 1.4.1 1.4.0 1.3.2 1.3.1 1.3.0 1.2.2 1.2.1 1.2.0 1.1.0 1.0.0