It sounds like you may be looking for wp_list_pages()
:
$args = array(
'child_of' => $post->ID
);
wp_list_pages( $args );
With the appropriate arguments I am almost certain that you can do what you need with that function.
Related Posts:
- How to check if feed URL was requested?
- problem with ajax and the path to the php page
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- Targeting single page with JS
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Remove General Tab and Plugin Tab in Settings in Woocommerce
- WooCommerce – Display variation custom field value [closed]
- Include a Gutenberg Block in a PHP file
- do not show web page section when using advanced custom fields pro
- How to slow down server response
- Featured image fallback link to permalink
- Facebook “like” open graph meta in header.php
- Working with a modified WordPress & Theme and updating WordPress
- Get all user meta by meta key instead of ID
- Automatically add custom CSS to new posts using a category template
- how can i show only the parents in owl-carousel?
- Use menu link or onClick to set a variable
- How can I reuse the code to capture a param in a URL and place in a value in a hidden form?
- Different Minimum Order Amounts based on Shipping Zone [closed]
- Store a default value for a transient on plugin activation
- Change “add to cart” button color based on Woocommerce product category [closed]
- Let Users Choose Post Categories
- Create highly customized submenu (possibly using wp_list_pages)
- $wpdb->wp_users returning empty value for
- WordPress Custom field Colors
- Excecuting php function in shortcode
- Correct and safe way to include php content in my page
- Revoke Access to certain user roles and admin pages
- Add content after the first post in WP Loop
- update_post_meta on multi-dimensional array options
- do_action(), iFrame Gets Displayed Despite Password Protection [closed]
- esc_url( ) won’t use https
- retain querystring values when savincustom options in admin
- Use post ID in functions.php file adminside
- How to show childs of certain custom post type in option list?
- How to edit HTML of my website on WordPress? [closed]
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- wpdb Cannot Update column in Database
- Change default gallery images – Currently they are displaying full size imagese
- How can I search all plugins for composer’s vendor/autoload.php?
- How do I prepare strings for insertions as values into a MySQL table?
- How to present a div only when the index.php is accessed for/by the single post pages
- Displaying list of posts in category page
- How to get post category list as select in front-end?
- how can I include some custom variable from functions.php?
- How to pick “full/thumbnail” images in the loop?
- Function to call either single post or category
- search and add in wordpress content
- AJAX function running TWICE with WordPress admin-ajax.php
- OOP PHP class extends TwentyTwenty_Customize in Child Theme
- PHP using external anonymous function inside class
- How to make Subdomain work for product_tag?
- Sort new column in Users wp-admin
- How to spell out a word in products/posts?
- How do I add a function to parent theme
- Are there any drawbacks on opening a session_start in functions.php and header.php?
- Custom PHP form needs refresh to load page correctly
- Child-Theme Category View with modified permalinks (%category% removed)
- Log out without confirmation request (nonce)
- Add Pre-Defined Value to Click Counter in WordPress
- Create a WordPress Contact Form to call a POST AWS API Gateway and send user data
- Show data obtained from a function and place it in a shortocode function
- Confuse between forms and tables
- How do I properly upgrade WordPress’s PHP within an OpenLiteSpeed GCP instance? [closed]
- Delete empty title_tags, find a h1 heading and echo it
- Get posts from year from URL
- HELP: cannot log into wordpress. PHP error
- WordPress is setting from header wrongly in wp_mail
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Add post title as a link parameter
- Trying to retrieve meta values from three different meta keys and display in rows
- Help with find a bit of code to move from functions.php
- This occurs when I open admin or front on localhost
- Search only for posts with specific metadata?
- oembed facebook link?
- Trouble with checked() for array of multiple checkboxes
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- Is it possible to dupplicate a WordPress post with php?
- How to create a radio button to alt between settings in wp_options table
- Filtered table in wordpress
- if user is admin display admin link and logout link else display logout only
- site_url() returns with additional backslashes
- Hide cart when empty [closed]
- How to redirect unattached image attachments
- Overwriting a Shortcode
- WordPress changing single quotes to double quotes in title and content
- Easier URL to an image
- MySQL database migration to WordPress
- Change order that the menu is generated with wp_list_pages
- Is this WordPress code causing page weirdness? Can’t scroll to bottom
- Search result page – display values from the result’s metaboxes
- Using variables as href in anchor tags (PHP) [closed]
- Parse error: syntax error, unexpected ‘else’ (T_ELSE) [closed]
- Code working in functions.php but not pluign for gavity forms
- WordPress add parameters with friendly url structure
- Different behaviour between “include_once” and directly echoing out html code?
- Custom taxonomy with page post type – WordPress
- Alternative to php echo within code
- Why does WordPress not send the user the email to add a password?
- How to put a class in the p tag automatically added by the_content() in the wordpress loop?