You can use for example very basic WP Query (or get_pages or what ever. this is just one example) (http://codex.wordpress.org/Class_Reference/WP_Query)
// The Query
$currentPageId = $post->ID; // get current page id inside loop
$args = array(
'post_parent' => $currentPageId,
'post_type' => 'page',
'posts_per_page' => -1
);
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
echo '<ul>';
while ( $query->have_posts() ) {
$query->the_post();
echo '<li>' . get_the_title() . '</li>'; // this one outputs only title
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
And there you have a list with titles for all the child pages of current page.
Related Posts:
- Why does the first category returned get echoed twice?
- get_children() not working properly – Only on one post?
- Display Categories or Subcategories with name & description in category.php
- get_pages displays only parents instead of children
- Get first level children of a page ID
- Get the children of the parent category
- Custom Nav walker display current menu item children, or siblings on no children
- Get the first image from post content (eg.: hotlinked images)
- Check if Current Category has Children
- Check if a post is in any child category of a parent category
- A check for if is parent page, if has children, if has grandchildren
- How can I hide children of draft pages using wp_list_pages()?
- get_term_children for immediate children only (not grandchildren)
- get_children() Not Working with orderby Parameter
- Exclude Child Posts from WP_Query
- How to make child categories recognize parent’s template displays
- Show just one level of child pages, wp_list_pages woe
- Can I display submenus in groups, using wp_list_pages?
- Prev/Next child navigation for current page?
- Child terms from multiple parents?
- Check if post has children or not
- How to display child term of current term’s parent taxonomy?
- How to order get_term_children output by alphabetic order
- Delete Child Posts
- How can I calculate the total number of categories at different hierarchy levels?
- Child pages on hierarchical Custom Post Types 404s
- Only allow new subpages to be created
- Show children of top level category only
- Get threaded comments number
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- get_children – wp_get_attachment_image
- WooCommerce – Display product child categories from specific parent
- How can I make wp_list_categories output li with category-slug as class, for its children?
- How to get the excerpts of all children pages
- List post from current taxonomy children
- Showing current subcategory
- WordPress Child Category Display All Posts
- How do I create a magazine type menu – sub-menu setup using wp_nav_menu and child of twentyten? [closed]
- Custom Taxonomy: Parent still counting deleted Child
- How to create drop down for child categories of current taxonomy being viewed?
- List the 5 most recent child pages
- Multiple Conditions for Child Page Title
- Exclude the parent custom post-type posts only
- Adding multiple post queries with parent and children to page – Best Way
- Get ID of child from child slug, while knowing parent ID
- How can I paginate image attachments in a post?
- Display post taxonomies tree
- Show only first children level of current category?
- get_term_children returns WP_Error for custom taxonomy
- WordPress count child posts of each parent custom post type and use in json array for google maps jquery plugin
- Set order of returned items in the WP_Query() class/function
- Create subpage – filter parent pages list
- How can I automatically add child pages to pages in a WP menu?
- WordPress get the child pages of current page
- How to Display child post on his parent post with thumbnail and content in WordPress
- Advanced or not so advanced pre_get_posts query
- Make Images appear in the same order as in media browser using get children?
- Query Posts Exclude Entire Category
- WP_Query: “post_parent” and “post_type” combination returning strange results
- wp_insert_post if page doesn’t exist under current page
- display childs without parent
- WP_Query with meta_query for children
- How to target a specific custom post type post and its all children and grandchildren?
- Taxonomies on custom taxonomies
- How to show all possible parents and children of a hierarchical taxonomy term?
- Sort order by slug for looped child terms of custom taxonomy
- Display Child Pages of Custom Post Type Parent Page
- get_children displaying images removed from the page
- Category shows only top level child categories
- Need help with category listing!
- How to show only subcategories in parent category not parent category?
- is_child() function
- get_page_children() return only titles
- Better wordpress attachment query than this
- filter get_children to return all mime types EXCEPT ‘x’
- Walker class for sub-menu with ACF fields
- `get_terms()` with `child_of` and `childless` combined
- Showing categories and subcategories with posts
- List all posts with the parent or grandparent of a page with a specified ID
- Get gallery images from page ID
- Permalink for PDF of article
- How to customize taxonomy archive template files for subterms?
- Drop-Down Menu of Current Child Pages
- List of child custom post types lists all custom post types
- Taxonomy Drill-Down / Plugin Help – hierarchical queries within plugin?
- Menu Arrow for Child Element
- Child Category Image
- Give Children Unique ID’s
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- How to display only the direct children of a term on a taxonomy page
- Is there a way to order children of post?
- Orderby menu_order not working; menu is sorted on publish date
- Display children category images
- How do I display child post types in the parent post type template
- (get_post_ancestors == 2) is returning true on 1 as well?
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- If product is in sub-category show code
- List child categories from parent category on custom taxonomy page
- How to print the current post depth as update notification?
- Displaying direct children of other pages on homepage