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
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Show content if parent page has children
- Capturing arbitrary semantic URL arguments
- Search with filters and title
- Order Custom post type loop by custom field (datepicker)
- Advanced Custom Fields Image Field returning ID instead of URL [closed]
- Display posts if a custom field value is equal to another custom field value
- sort by date in Advanced Custom Field
- ACF if / else checkbox [closed]
- Load child template based on parent
- Need wp_query to return all children and grandchildren
- ACF: how do I get the fields and its values of a specific group?
- add custom filters to the event calendar plugin programatically to frontend [closed]
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- wordpress ajax relationship query
- Specific routing for CPT
- ACF add custom fields to categories and display
- ACF custom field in [closed]
- ACF: post query, hide duplicate values [closed]
- How to list a page tree?
- ACF Pro make URL Linked in Custom Template [closed]
- List of users that clicked a ‘Join’ button at single post
- Can set_post_thumbnail be used to remove a thumbnail?
- How Do I Use a ACF Custom Field To Add A Slider ID?
- How to give each category name its own ACF background color?
- How do I ensure the social icons appear on all pages? [closed]
- Advanced Custom Fields – Relationship post foreach query
- The conditional logic only works to show or hide?
- Advanced custom fields and Slideshow gallery desn’t work together? [closed]
- ACF: Grid based on field value
- How to set up page fields with gutenberg instead of ACF
- Set edit capability based on ACF relationship
- ACF multi taxonomy on filterable gallery
- ACF Taxonomy field values not select in backend
- How to display acf repeater in tag archive page?
- Loading ACF Field content on a 404.php page
- Display Specific Posts at Start of Loop
- Advanced Custom Fields oEmbed video width and height
- How to output values from a loop into a javascript array
- Free version of Relevanssi doesn’t show ACF fields
- WP_Query, ACF field and array
- Returning incorrect $post->ID after installing plugin
- Get posts meta_query by repater field
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- WordPress dynamic subpage for ACF
- Providing fallback function and allow override by plugin
- Child Theme problems
- Custom post type child page 404
- ACF Image Object Sizes Issue on Multisite
- Updating custom fields with data from the database
- Conditional sidebar menu
- ACF Load Field Groups Programmatically [closed]
- Add comma between variables [closed]
- While loop inside another while loop
- ACF Display Taxonomy Image Field
- Many big issues in the website, WP_Debug not showing
- ACF – if field has value within Field Group conditional statement [closed]
- advanced custom fields: repeater field within conditional statement [closed]
- Load images from CDN and custom features to “Add Media” dialogue