I think you need to do two things
- add ‘echo‘ to last line
<?php echo $parent->post_content; ?>
- add ‘global $post;‘, before accessing the $post.
let me know if this does not work.
Related Posts:
- Using single.php from plugin folder instead of default template folder
- Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
- Add wp-link-pages to post
- Get current post’s child page?
- Wrap div-tag around posts in page
- Insert Shortcode exactly at the end of the content
- Determine if page is the Posts Page
- Get the Current Page Number
- How to detect single.php (but not single-portfolio.php)?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Keyboard shortcut for updating a page or post?
- Apply the_title() filter in post & page title, but not in menu title
- How to display by default only published posts/pages in the admin area?
- Get current menu_order
- Difference between an archive and a page listing posts
- Delete Associated Media Upon Page Deletion
- The next_posts_link() works only with original $wp_query
- Get content from one page and show it on another page
- How to Check if a Page Exists by URL?
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- get_children() Not Working with orderby Parameter
- Custom Single Post By Category
- how to limit edit_form_after_title hook to page and post edit only?
- Post/Page Publish/Update button not clickable once I make an edit
- Strategy for handling hierarchical pages with empty parent content
- Skipping first 3 posts in wp query
- Custom Field in Featured image for A particular post
- How to add a new tab to page editor
- Custom permalink structure only for default posts
- Related Posts by Multiple Tags?
- How to display the page title/content in the Posts page?
- Callback for wp.autosave.server.triggerSave();
- How do I create a link that will always show the latest post?
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Restore contents of deleted user
- disable password protected page for logged users
- How to change post to page
- RSS for Pages Instead of Posts?
- Display posts by tag on page
- Why do I need to use The Loop on pages (inside page.php etc)?
- What is the difference between “post” and “page” in WordPress?
- Create custom page in WooCommerce
- posts page – different lengths of excerpt
- WordPress automatic and permanent page
- Is there a WordPress equivalent to MediaWiki templates
- Determining Slug Before and After Edit
- Getting an alphabetic post list with two letters onclick on letter
- Automatically create pages in a post based on number of words
- Post X of Y in single.php / sidebar.php
- HTML code in Custom field
- Static posts page with home.php
- Change WordPress post-state in Admin Area
- Pagination not working on Custom Page Template
- Set number of article per number of page
- Pagination for Pages and Posts
- How to have different content in the loop and single
- Is it possible to show a different WP menu when using password protected pages?
- Can I change a post to a page by changing it’s type?
- Overview with latest edited posts and pages
- Single.php Active Category Class
- Display “Post 2 of 4” on single post page?
- how to show all post in my page-grid.php template page
- eBooks download website, page or post?
- Multiple loops in same page, without duplicate content
- Add a custom option to a page in backend
- Include related posts on a page
- why does HTML Tag not working in Post and Page
- Creating new page with pre-defined parent page
- How to add shortcode tags in single.php [closed]
- problem to delete page
- get_terms parent for current product only
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- custom single.php not working
- Populating a page with content from post custom fields
- Can I hide a specific post from latest posts page?
- Hide add new page button
- Edit menu item title from edit page/post
- Redirect before post page
- $post object is null
- How to display different single post template based on author?
- How to show post(excerpt) from specific category on wp page?
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- Is there any WordPress alternative to Book module of Drupal?
- Changing my permalink structure – will new layout conflict with existing page?
- Convert a complex webpage into WP theme
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- how load content as pop-up using ajax
- Disable single post page
- how to know if the post has pagination () or not
- Remove arrows from previous and next link
- disable column on post and user list
- WP_Query do not load specifed number of post
- “next_posts_link” and “previous_posts_link” display me NOTHING
- Can a page_id and a post_id be same?
- How to restore permanently trash page? [closed]
- How to disable single post view in wp
- Custom Post Templates
- Add code just after Post content
- Custom Blog Post Page
- How can I display widget in a Page or Post?