you can use the number param to limit the number of pages you want and get the custom field in the foreach loop 🙂 (child of = your parent page, or the current page)
$mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc', 'number' => 3, ) );
foreach( $mypages as $page ) {
$content = $page->post_content;
$content = apply_filters( 'the_content', $content );
?>
<h2><a href="https://wordpress.stackexchange.com/questions/61211/<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a></h2>
<div class="entry"><?php echo $content; ?></div>
<?php
}
Related Posts:
- Advanced Custom Fields – Get custom fields from parent page
- how to properly list child pages in sidebar?
- Get custom field value from Grandparent Page for Parent and Child Pages
- Given the page id, check if it has children
- How to get a list of all recently published child pages?
- WordPress get the child pages of current page
- Show siblings (if any) and parents
- List child pages of current page but limit to specific year
- Advanced Custom Fields dynamic update_field
- Child page excerpt
- How to populate a parent page with its child subpages and associated templates
- Create WordPress child page from page actions
- How to show child page without providing ID so it’s dynamic
- is_child() function
- Drop-Down Menu of Current Child Pages
- Get WordPress Child Page IDs
- Displaying the first child page of the parent page
- Adding title and description to subpage’s featured image
- Show list of Child Post in Parent Post
- List subpages in order
- parent page grabbing wrong url for child pages – get_page_uri($pageChild)
- i want to get the parent id, only on parent -> child -> child page
- Get first level children of a page ID
- Only one parent page showing
- Create a list of pages excluding children of selected page
- WordPress Betheme: Unkown subheader image of a child page
- How to disable alphabetical sorting page
- Structure for calling child pages
- Child pages and sub-pages do not appear. Why?
- Add link to parent page in list of child pages
- Display child pages full template including the content
- List child pages, exclude the current page
- Listing Child Pages in Random order
- How to display child pages with in a limited child content?
- Display Child Page with custom fields within Parent Page
- Display Tags of Child Pages
- Get post_meta of children and compare to current page ID
- Limit the number of child page displaying
- Show the grandmother/father of the childpage
- How to Hard Set the Parent Page in Template
- Website parent child relationship
- Displaying child pages and file URL in an ACF relationship field shortcode
- How can I clone/copy all fields (post and meta) from parent CPT post to child (with synced fields?)
- Advanced Custom Fields, WordPress, Javascript Tabbed Content
- WordPress post image change on hover (ACF?)
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- wp query to get child pages of current page
- Where are custom field values stored in the database
- Get parent page url to show up when it is in child pages
- Filtering multiple custom fields with WP REST API 2
- Filter by custom field in custom post type on admin page
- Getting custom taxonomy from custom post type
- Check if is on child-page of a particular page
- Media library – Limit images to custom post type
- WooCommerce shop page to use my custom template [closed]
- A check for if is parent page, if has children, if has grandchildren
- Unable to check if plugin is active
- Display all values of custom a field created with ACF on a page
- How to import CSV into Custom Post Type custom fields?
- Filter next_post_link() and previous_post_link() by meta_key?
- Can I have two child pages of different parents with the same name?
- ACF – get fields from group
- Order get_terms using a Custom Field
- Display List Of Posts Containing a Relationship Field Value [ACF]
- Remove WordPress theme from a specific page
- Front end form to create a custom post with preview
- importing third party json feed as custom post type [closed]
- Create a “Dummy” parent page for a hierarchy in page listing?
- How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
- update_post_meta and update_field ony working when saving the post
- Add custom field to the archive page?
- How to get “Additional CSS Class” for ACF Gutenberg block
- how to get posts by custom post type then display Custom fields?
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Advanced Custom Fields select field : How to echo the label, not the value? [closed]
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- functions.php inject inline css
- Using OR conditions in meta_query for query_posts argument
- Automatically create child pages when saving a (parent) page
- Matching Serialized Arrays with meta_query
- Display a list of child posts on parent posts of a custom post type
- advanced custom fields update_field for field type: Taxonomy
- Get value in custom field with taxonomy [closed]
- Allow only new sub-pages to be created
- ACF: get_field() returning false [closed]
- ACF Relationship Field Search Filtering [closed]
- 404 on child page when parent page slug is identical to custom post type
- How to List Events by Year and Month Using Advanced Custom Fields?
- Is there a default template file for child pages / subpages?
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Filtering a WP_Query meta_query by numeric values isn’t working
- Child Pages Loop
- How to position a custom field before the editor
- Prev/Next child navigation for current page?
- Generate a excerpt from an ACF-wysiwyg-field
- Populate a ACF Select Dropdown from Custom Post Type
- Get Permalink for the top level parent of child pages
- Preferred way to include Advanced Custom Fields in a plugin?
- Automatically fill custom field value on post publish/update
- How to display product price of the product in loop