How do I include the page content of one or more page in another page?
ex. I have pageA, pageB and pageC and I want to include the contents of these pages in pageX
is there a wordpress function that loads the post of a specified page/post?
like show_post("pageA")??
There is a Wordpress function to display the content of a particular page inside another using query_posts() it is:
You set the number of pages to be displayed to 1, post type is page instead of post and the page id
You could install a Plugin "Improved Include Page". Once installed, you create page X and enter:
where these are the ID's of pages A, B and C respectively
This is obviously a portion of the post, I got the detail from the wordpress codex.
Interesting... I looked around for how to embed Wordpress content elsewhere (as in, on another website), and found some things...
Hope those are quasi-helpful. While they all are solutions for getting your WP content on some place other than WP... they might work for your given question and allow you to display A, B, and C on X.
Pages are just posts, with a post_type of 'page' in the database. You can show the content of multiple pages on another page by writing a post query in your pageX template that gets the posts you specify and output them in a Loop.
There are three ways to get post content from the database:
These links all point to the WordPress Codex. Get_posts and query_posts have an argument available, 'page_id', where you can specify the id of the page you'd like to retrieve and display.
I found this answer posted on the Wordpress forums. You add a little code to functions.php and then just use a shortcode whenever you like.
For the shortcode,