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
- is_page_template not working
- When is get_template_part() preferable to simply using the template.php files?
- Having different sidebar content for MANY pages?
- How to inject custom url path for page ?
- Is including the loop necessary for page.php? [duplicate]
- Store Page Template Files in a Subfolder
- 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?
- Video Background – (php & css) – generating 404 error on page load – WordPress Theme File Structure Help
- Created custom post type but selected template not staying selected
- Why is POST’ing to my WP page template producing a 404?
- Grabbing the page template name?
- Adding the Admin Bar to a page with a custom template
- How to make certain page templates visible to admin only
- wp_title() handling of author page
- Do I really need the div class entry?
- How to edit 404 content via wp editor?
- Subpage template
- Custom Blog Post Listing in Genesis Sample Child Theme
- wp_redirect() does not work in custom template file
- Pull in custom content types into page template
- Programatically changing template of a page
- Creating a Page of Posts
- Creating a new page template
- Unexpected results with conditionals inside template part
- Pre get posts where template is not equal to one specified?
- Change content of page in child theme using plugin
- Highest number of WordPress Custom Page Templates?
- Can two custom templates be used to create a single page?
- Use the_title_attribute() for the WHERE parameter in a page template
- Find the page template of the previous page
- Conditional get template part
- Removing the TinyMCE editor for a given page template
- Cant remove line that appears above page content
- Getting pages filtered by template assigned
- Get the url of a page template without using the page slug and ID
- Why does my content disapear when I make a page to match an archive name?
- Page template without header & footer
- Page template for blog not working
- WordPress showing 404 page template for unpublished posts
- Change Post Template based on post meta?
- !is_page_template not working with && operator
- Is there a way to create a template that does not have the site styling associated with it?
- Need help with adding templates (archives and sitemap) to WordPress child theme
- Is it okay to use page template as contact page? [closed]
- JQuery Plugins in WordPress
- Dynamic href link to Contact Page
- Including facebook.php in a wordpress page template?
- Create page template with some static contents
- How to build a PDF repository in WordPress
- Page with posts from category doesn’t work
- Create page (not the post type) dynamically
- Why is a renamed custom template file still showing up in the template dropdown menu?
- How can I load 2 random pages?
- How do I edit text displayed on my browser tab?
- Blog page wont use blog-template.php
- The best way to create pages like an ‘about’, ‘contact’ and etc [closed]
- Image not showing on page template in Twenty Fifteen-theme
- How to add pages in wordpress using codes?
- Injecting pre-defined text from custom page template to editor
- WordPress Page doesn’t load the template selected
- Organize template parts and page templates in folders in regards of template hierarchy
- Limit page template choice by page title or ID?
- Custom folder for wordpress page templates
- WordPress custom login and register page problem?
- Authors posts on a author created page
- Using conditional statements in place of custom Page templates
- Controlling the Admin panel for page templates
- Page Templates automatically showing index page contents?
- Suggestions: Customizable header image and style colors that are different for each page
- Give custom page template a custom post ID
- Create Page with Pagetemplate and get a post_type_object->template
- How to show metabox on page if it is using a template
- Inserting article:tags meta in html head-element, using get tags, no wp_head
- Adding styles/scripts to specific page
- wp_logout() not working after form submission
- Set page title in WordPress with PHP
- How to allow user to select page template from front end?
- WordPress form submit to custom page template does not work
- Converted HTML5 to WP, How to apply converted classes to new pages (after conversion completed)
- Custom page template displays the archive template
- Using a page-template to restrict access based on IP (Frontend)
- Need help in creating splash intro page using custom page template
- Adding secondary featured image for page_for_posts
- What is the best way to create very custom campaign pages?
- custom page or standalone page?
- Own Custom Tags/Category page ( posts)
- Using page template as Static Front Page
- How to make page template with admin able to select NextGen Galleries to be part of the layout?
- Showing sidebar-2 on custom template page
- Background of default template showing instead of the background of custom page template
- Videopress Short Tags not working when pulling page into template