Child Pages Shortcode
You can use shortcode for display child pages from the page.
The facts
- Rating
- 4.6★ from 20
- Active installs
- 5k+
- Price
- Free
- Last updated
- 28 Nov 2017
- Added
- Oct 2011
- Requires WP
- 3.8
- Tested up to
- WP 4.2.39
- Downloads
- 95,254
Our analysis
AI-assistedChild Pages Shortcode is a WordPress plugin that allows you to display child pages of a parent page using a shortcode. You can customize the HTML template and control various display options such as width and excerpt filters. This plugin is suitable for users who want to manage and present child pages on their WordPress site effectively.
The plugin adds the shortcode [child_pages] to your content, which can be used to show child pages with customizable attributes. It also includes filter hooks for advanced customisation of queries and templates, making it a flexible option for developers.
Best for: This plugin suits WordPress users looking to display child pages in a structured way.
What it does well
- ✓Free to use from the WordPress.org directory
- ✓Customizable HTML template for child pages
- ✓Supports shortcode for easy integration
- ✓Includes filter hooks for advanced customisation
- ✓Maintained on GitHub
Where it falls short
- •Last updated in November 2017
- •Tested only up to WordPress 4.2.39
- •Limited information on features
Verdict
Child Pages Shortcode offers a straightforward solution for displaying child pages, but its age and limited updates may be a concern for some users.
From the developer
Takayuki Miyauchi's own description of Child Pages Shortcode, lightly tidied.
You can use shortcode for display child pages from the page.
This plugin maintained on GitHub.
Some features
- This plugin will add shortcode
[child_pages]display child pages. - You can customize default HTML template on your plugin.
- This plugin will be able to “excerpt” to the pages.
Example
Display child pages of the current page.
[child_pages width=”33%”]
Args
- id – ID of page (Optional)
- size – Post thumbnail size. e.g. ‘thumbnail’ or ‘large’
- width – width of block for child pages.
- disable_shortcode – Shortcode not work in the template if set true.
- disable_excerpt_filters – filters not work for the excerpt if set true.
filter hooks example
Filter for query_posts() query.
<?php
// default args
$args = array(
'post_status' => 'publish',
'post_type' => 'page',
'post_parent' => $id_for_the_post,
'orderby' => 'menu_order',
'order' => 'ASC',
'nopaging' => true,
);
add_filters('child-pages-shortcode-query', "my_query");
function my_query($args) {
//
// some code here
//
return $args;
}
?>
Filter for default template.
<?php
add_filter("child-pages-shortcode-template", "my_template");
function my_template($template) {
return '<div class="%class%"><a href="%post_url%">%post_thumb%</a></div>';
}
?>
Filter for stylesheet URI.
<?php
add_filter("child-pages-shortcode-stylesheet", "my_style");
function my_style($url) {
return 'http://example.com/path/to/style.css';
}
?>
Default Template