first you can know the relationship between child post and parent post try to figure it out or just try this code
$query = new WP_Query( array(
'post_parent' => get_theID(),
'posts_per_page' => 3, //shows only 3 children. If you want to show all of them, comment this line
));
while($query->have_posts()) {
$query->the_post();
/*Output the child markup here*/
the_content(); //Outputs child's content as it is
}
wp_reset_query();
?>
Related Posts:
- How to Check if a Page Exists by URL?
- How to display related posts by subcategory and not parent category
- get_the_category listing in hierarchial order
- Display hierarchical categories/sub-categories for a single post only
- How to get Images included in Post
- Accessing the post content with WP_Query
- How do I use inline SVG in WordPress
- Setting post meta data to random value during post status transition / on publish
- Add link on the top menu of the post table?
- Get the object ID by URL
- Add a special filter link to All Posts in admin
- Alternate custom content in the loop
- Custom Post Status Posts viewable to the public
- Add an image box besides featured image?
- Use Cron to modify posts via sql
- Pull posts from another wordpress install on same server
- Using Custom Posts with Metaboxes and Drop-downs
- Create pretty permalink for a post knowing the permalink structure
- How to change the title url on the edit post screen?
- What differences are there between a Privately Published post and a Draft post?
- jQuery inluclude still seems ncessary for script to work within post
- White Blank Page when Updating and Publishing Page/Post
- Can I create a not clickable post?
- WP_Query Authors OR Categories
- get_the_content_feed with paginated posts
- Pass data between pages
- How to create large page
- How to get rid of shortcodes in post content once and for all
- Why is querying posts messing up my pages?
- How can I find out what items a user has purchased? [closed]
- Print all the tags from a custom post type Please
- WordPress Loop – Next 3 Posts
- How to do set post permalinks using 6 digit random unique function?
- Encountering “Wrong nonce. Action prohibitied.” when trying to alter User Role and unable to Post via WP Admin
- Prevent scheduled post being published if date/time is past current date/time
- Set Default Category to Username
- Issue where WP Featured Image will not display
- transition_post_status hook doesn’t have any POST data when publish with Gutenberg [closed]
- All Posts admin screen – show time underneath the ‘Date’?
- Display post category in foreach loop
- Single.php – Get Current Parent Category
- add to end of post in the loop with plugin
- Get all custom post types excepted some…
- insert a warning message into post-new.php
- WP text editor change html markup
- How to detect when admin user is on the All Posts page?
- preg_replace not removed “class”
- Is it possible to give the user the chance to select between two single template files to use in a post?
- Modifying the following code to displaying the title and the content of static page Posts page?
- if in category but only with post meta
- Insertion of a non-english string to database
- Programmatically add posts from specific category to menu
- Current and next month posts
- Adding a meta box to determine the sidebar [closed]
- https and wordpress breaks posts
- Date is wrong on ‘all posts’ page
- Is there a way to display others posts in my post?
- How do I disable the “by author” hyperlink on posts?
- Custom post type slideshow background images to insert in a plugin
- How to call WordPress First Image Post or else Attached Image or Default
- Recent posts script mess up blog posts
- Regarding Posts
- How to allow arbitrary inline CSS in posts?
- How to Remove HTML Elements from Post Excerpt?
- Permanently deleted posts still exist
- How to optimize posts query in wordpress
- how can sort my column
- Featured Story Shortcode not outputting content
- Order by meta_key field in WordPress not meta_value field value
- How to remove a post from results by ID after query?
- Blog featured images disappeared on my homepage
- How to run select query of post with category and tags?
- WP_Query extended with AJAX
- Manipulating images inside post content
- How to create frontend Post filter using meta query
- im trying make a function to auto correct posts when i open the posts in the backoffice
- Point users to a specific url directory for some posts
- How to test if user is filtering post list in dashboard
- WordPress The Next Posts
- Post Format problem
- User rank in wordpress post
- Add Image Before Posts Entry Title
- Some comment box wordpress in 1 post [closed]
- Authentication over CURL
- Adding The Post Template Dropdown to WP-Admin
- wordpress paginate, link to the right page
- How to link two news page multilingual press
- Delete junk text from all the post using my sql command
- Single.php loses it’s formatting
- Separate categories parents, childs and grandchilds in dropdowns
- How *not* to show the last post on the latest posts list
- How to Do Custom Fields to Output a Definition List
- Using the_excerpt() some posts are truncated and some are not
- Error 404 blog/page/2/
- WordPress limit post that subscriber can create
- How can I add a custom caclulation form in post?
- Display post count on archive page in reverse order
- Displaying all images from a WordPress post (including media library)
- WordPress shows a count of published items on the site, but the items are not appearing when you click on the “published” link
- Restore posts, but only posts that exist in my database backup