First set your arguments(settings)
$args = array(
'post_parent' => get_the_ID(),
'post_type' => 'page',
'numberposts' => -1,
'post_status' => 'publish'
);
$children = get_children( $args, $output );
then you can use something like this
<?php if (!empty($children)):?>
<ul class="row">
<?php foreach($children as $dest){
$permalink = get_permalink($dest->ID);
echo "<li class="col-sm-4"><a href="https://wordpress.stackexchange.com/questions/254608/{$permalink}">" . $dest->post_title . "</li>";
}?>
</ul>
<?php endif;?>
For more info
https://codex.wordpress.org/Function_Reference/get_children
Related Posts:
- Child Pages Loop
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- Get top Page IDs from menu and cycle through their child pages on a scroller
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Get post by page name or slug
- Is including the loop necessary for page.php? [duplicate]
- Identify the page being shown while in The Loop
- Displaying child page content of a certain parent
- If Loop has odd number of posts on last page Custom style for last post in it
- single page site with subpages
- How to loop through ALL pages?
- Loop and Page template : my WP_query don’t take args
- Create a loop that gets pages with their template
- Display content of page template (get_page)
- Loop after page content
- wp alchemy multiple image uploader output images to template
- How to hide all child pages with post_query?
- Get Page content to displayin Bootstrap Modal
- Listing subpages title and content and styling the first iteration differently
- How do I make a variable available inside partials?
- Exclude page name from loop
- Stepping through a foreach loop – adding +1 to the end of it so next time it loops it starts on item 2
- Include multiple page ids in loop
- Get post offset/posts page offset in single post page (outside the loop)
- First archive page with a few posts
- Tags on page (not post) returns nothing – why? Improved clarified question!
- Display child page content of a specific parent on home page
- Exclude page from loop results
- Print the whole page?
- WP_Query is only looping home page, not pages
- How do i create a list-posts-page?
- WordPress: query pages except remove one page
- Archive: Lists itself
- is it bad to copy the loop for a template?
- Search – Check if post is a page on search page
- Structure and Display Content from Multiple Pages on Single Page
- Making a specific page wordpress compatable that is not index
- Default Template infinite loop of Title
- Have multiple loops on a page appear after/between page content
- get_template_part() to render single page Theme
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- How can I programmatically create “child” pages on theme activation?
- How do I get the attributes of a short code from a post?
- wordpress loop for specific category
- Three different post types on homepage
- Add Incrementing ID to each paragraph in the_content
- Transient not working for custom loops
- Custom Loop, Match Category with Page
- Display page of custom posts?
- include(locate_template) messing up the loop
- Multiple loops in same page, without duplicate content
- Loop – how to get previous/next post for first/last post?
- How to add “time” data this?
- Loop through all media library images and return those where caption contains the text carousel
- Displaying the last page of posts
- How to get_posts where ‘menu_order’ is more than 0/zero?
- WordPress Redirects on Install
- How to load all pages into one page with their templates
- How to return only one instance of each, from the entire loop
- Combining action and filter?
- Shortcode with a foreach and arguments
- Calling & display certain product category loop and pagination on the homepage
- Detect if current page is front page within custom query
- Sanitize Custom Field Value in Meta Query
- Default ‘post’ post type archive slug?
- show random image in loop if image is not set
- Pagination – works on local but not live dev!
- need help looping add_action in wp
- Does WordPress Loop have a function like Shopify’s cycle?
- Combine the results of two loops [closed]
- How can I improve the performance of this query_posts loop?
- Add leading zero to current post display [closed]
- Output meta into arrays
- Moving wordpress to different url/server creates redirect loop
- Pulling in featured image into default recent posts widget
- Modify loop output for a specific list of categories
- Pagination for two loops
- Loop info in jquery Tabs – loop into a variable?
- Thumbnail Image Rounded Corners w CSS (or any other good method)
- Several loops in sidebar issues
- Adding $args to wp_schedule_event() causes hook to add infinitely to WP Cron
- $post is undefined in wordpress loop [ajax]
- Insert content above an embedded video inside Wordress’ php the_content
- the loop printing post in one grid
- Check value of post meta within IF statement
- My WordPress installation doesn’t load correct template
- Work arounds for conditional checks inside the loop in search.php?
- Get Sticky User in user loop based on user role
- Popular posts with Varnish ESI
- Querying posts from only one category and exluding the latest post
- List of child pages fetch next results at link click
- WP update_post_meta link loop
- query_posts ignores the argument
- Need some help with “the_widget()” function
- Exclude Authors based off date of last post
- Loop from another WP site onto mine
- Having issue with WordPress loop
- Wrap every 2 divs in row – for each loop [closed]
- How to add class to the last image of the last post in a loop
- Hook in the loop after the first post