Add this to you theme, just after the title part that displays the title.
<?php
$args = array(
'post_type' => 'page', // Only get pages (attachments can be listed as children)
'posts_per_page' => -1, // List all the children
'post_parent' => $post->ID // Get pages that are the children of the current page
);
$parent = new WP_Query($args);
if ($parent->have_posts()): // If there are any children
?>
<ul>
<?php while ($parent->have_posts()): $parent->the_post(); ?>
<li><a href="https://wordpress.stackexchange.com/questions/365619/<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php endif; wp_reset_postdata(); ?>
Related Posts:
- A check for if is parent page, if has children, if has grandchildren
- Can I display submenus in groups, using wp_list_pages?
- Only allow new subpages to be created
- Create subpage – filter parent pages list
- How can I automatically add child pages to pages in a WP menu?
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Displaying direct children of other pages on homepage
- Get all children titles of a page as a link to them
- Multiple Loops That Pull Pages (Child/Grandchild) While Styling the First Entry
- Search anything from a Child and Sub-Pages of their Parent page
- 1st Level Page with No Children
- how to list subpages in sidebar without widget
- How to configure WordPress to handle 75,000 pages?
- How to disable posts and use pages only
- multi page password protection
- Create a “Dummy” parent page for a hierarchy in page listing?
- Password protected post or page – error message by wrong password?
- Get next/previous cousin page
- I want only my sub-pages to be clickable in the navbar
- How restrict page for users logged? [closed]
- How do I turn comments off for pages, but not posts?
- WordPress 4 and wp_editor() Not Showing Visual/Text tabs
- Check to see if page exists problems
- List Child Pages of Parent Parent Page (Child pages from Grand Parent)
- How to add meta boxes to Pages
- Form action redirect to the same page
- How do I create a separate page for each author?
- Overriding the currently selected menu item
- WordPress pages with hierarchy
- How to incorporate Documentation into wordpress?
- Missing parent page attribute
- Hiding Page by Title from Editing
- Get page by its ID and display it on another one
- Get all pages that are published
- Add a predefined page to site
- creating and styling a within a page
- What are trackbacks?
- How to enumerate a list of posts?
- Missing ‘Page Attributes’ in page edit
- How can I redirect to my custom page without loading the Dashboard itself?
- Remove ID page from wp_count
- category slug and page slug same
- New user Registration data imported into Page
- Updated WordPress, now getting errors on site
- Edit Parent page drop menu when creating a page
- Get parent of current page
- How to list a page tree?
- Attachment pages stealing page slugs
- How to add an external php page with wordpress?
- Exclude pages by menu order
- WordPress pages not working out correctly with HTML
- Change page name in admin list
- How to exclude authors from get_pages()
- Folder wordpress page redirect
- Dynamic page with comments
- How to rewrite a page url
- Display pages in alphabetical order
- Listing all child-pages of a parent-page on the parent-page and each child-page?
- Loading scripts on specific pages using PHP in footer.php
- How to recover pages from site with only ftp? [closed]
- get_page() – Only variables can be passed by reference
- Need Help with Custom ModRewrite
- Archive limit the text of the_content
- upgrade has caused page content to disappear
- Website jumps to top when scrolling down
- Can’t find the page that is using a slug
- Translate dashboard metabox
- Create page template
- How to transfer a site to hosting?
- Add custom action to the page listing screen
- How can a .css file be applied to a virtual page?
- WordPress blog posts template bug [closed]
- Checkboxes to automatically create pages when I activate a theme
- Cannot update page – with too many characters?
- Is it possible to embedd this web app to my website [duplicate]
- Using external DB within wordpress
- Cannot use old slug – it just 301s to site home page
- Display inner pages like posts.[Like how post excerpt works]
- include exception inside theme for empty widget area
- My pages disappeared from the list
- Pre-populating new Page creation with shortcodes
- How to display time when page is created and edited
- Loading internal page
- Firing page_publish where page is child page
- Add text to the bottom of particular pages
- Access wordpress pages using a self signed shared ssl
- Page loads all pages of the image gallery with pagination
- Group Pages based on Parent in Admin Area
- Google indexed pages for one page site
- How to exclude page in pages module
- get id custom tables on current page
- static page with buton that opens collect email form
- Parent for a single (single.php)
- Multiple WordPress Pages
- How to create an user defined page?
- How can one get page by pagename if it is a child page?
- Archive with specific keyword by category sorted by date
- How to make a conditional statement that checks if the page is the child of a certain page?
- Is it possible to keep the page title from actually appearing at the top of the page?
- Missing page on wordpress “Pages” dashboard [closed]