First, you need to query the child Pages:
$pageargs = array(
'numberposts' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'post_type' => 'page',
'post_parent' => $post->ID
);
$childpages = get_posts( $pageargs );
Then, you need to create your custom Loop:
foreach ( $childpages as $childpage ) {
// Output whatever you want here, such as:
?>
<h2><?php echo $childpage->post_title; ?></h2>
<?php echo $childpage->post_exerpt; ?>
<?php }
Note, however, that Pages do not by default support excerpts. So, you’ll need to enable that, in functions.php
:
// Add Excerpt to Pages
add_post_type_support( 'page', 'excerpt' );
Then, you should be all set.
Related Posts:
- get page title, url and excerpt of a page
- get_pages — parent vs child_of?
- Displaying page content in category archive (archive.php)
- Trying to return list of child pages for a template
- is_front_page and is_home are not working in page.php
- Template Tag Does Not Work in Page Template
- Custom templates not showing up in template dropdown
- Getting only direct child pages in WordPress with get_pages
- How to display page content in a page template?
- What does is_page_template() compare against?
- Creating custom blog page template the right way
- Conditional tag to check if ‘page.php’ is being used?
- A check for if is parent page, if has children, if has grandchildren
- How To Create A Paginated List Of All Categories On My Site?
- How to add a .php file to WordPress
- is_page_template not working
- When is get_template_part() preferable to simply using the template.php files?
- WordPress page edit does not save selected template
- How to remove all styles for certain page template?
- Is it possible to manipulate the list of page templates?
- Having different sidebar content for MANY pages?
- Set page template automatically based on parent
- Is there a default template file for child pages / subpages?
- Password protected posts redirects
- Variable use in get_template_part
- Overriding page template using page_template filter
- Create built-in pages without creating actual pages
- Simplest way to add a second html editor to the post/page admin?
- How to consolidate multiple static page templates into one dynamic one?
- Loading page content into a variable in template
- How to display code if it is not certain pages?
- Multiple areas of dynamic content in a page
- How do I set and list page_template with wpcli?
- How do I modify this page template to show subpage excerpts (not post excerpts)?
- Limit number of pages that use a specific template?
- How to inject custom url path for page ?
- Capturing arbitrary semantic URL arguments
- How do I display the text inside the WP editor for a page with a custom template?
- Dynamically Load Styles and Scripts from Theme Functions.php
- Is including the loop necessary for page.php? [duplicate]
- Dynamically assign same page template to child page as parent
- What content should go in index.php?
- Store Page Template Files in a Subfolder
- How to show a post single post in page template
- How to pass a numeric id to a page template?
- How can I dynamically load another page template to provide an alternate layout of the posts?
- Add custom admin menu item for pages using a certain template
- Is it possible for a plugin to register a page template file?
- Create a new template for twentytwelve
- get url page template
- Single page theme that uses pages for the content
- Posts archive index pagination in a static page custom query
- Trying to list out child pages with WP_Query
- how to show all post in my page-grid.php template page
- Different “Text Widgets” in Sidebar on Many Different Pages?
- What’s the most minimal way in which a page can be hooked into WP?
- Video Background – (php & css) – generating 404 error on page load – WordPress Theme File Structure Help
- Calling a function from functions.php in custom page/ blog post
- How to remove a parent theme template from Quick Edit?
- How to Set a Custom Template for Blog Posts
- is_page_template & is_page in functions.php not working
- Removing or Restricting Access to Page Templates for Editor Role
- Created custom post type but selected template not staying selected
- Why is POST’ing to my WP page template producing a 404?
- Can I create a page template, use it once, then hide/remove the option to use it again?
- Are page/post IDs unique across a whole network?
- Custom template for each page
- How do I create multiple page while active a theme
- Theme’s page.php and index.php template files are confusing me
- Grabbing the page template name?
- How can I have a static title on my blog page?
- Adding the Admin Bar to a page with a custom template
- Programmatically set page template based on page ID
- Use is_category(), is_tag(), … in functions.php
- What are the differences between “Latest Posts” and “Static Page”?
- How to make certain page templates visible to admin only
- Help with a custom page template – listing contents of childpages?
- wp_title() handling of author page
- Can you call a template file without assigning template to a page in the admin panel?
- page-slug goes to not found
- Why am I getting syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in this template? [closed]
- Do I really need the div class entry?
- How do I add a body class to specific pages?
- How to edit 404 content via wp editor?
- How to list all titles of posts on a specific page?
- How to handle a missing page.php?
- How to dynamically save a selected option from page “Templates” selectbox?
- Customize edit.php Pages listing in dashboard to show only pages with a particular template applied?
- Multiple portfolios with one custom post type?
- Subpage template
- Programatically switch page template?
- how to change link of some wordpress pages
- Custom Blog Post Listing in Genesis Sample Child Theme
- How to create a page template that retrieves content from db?
- Change path of the page’s template
- wp_redirect() does not work in custom template file
- Remove all theme CSS & JS from wp_head (but only for 1 page template)
- Pull in custom content types into page template
- Get page id of current page from template [duplicate]
- is_page_template returning false