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 not a
show_post()function per se in WordPress core but it is extremely easy to write:Note that this would be called with the page’s path, i.e.:
Of course I probably wouldn’t name a function as generically as
show_post()in case WordPress core adds a same-named function in the future. Your choice though.Also, and no slight meant to @kevtrout because I know he is very good, consider posting your WordPress questions on StackOverflow’s sister site WordPress Answers in the future. There’s a much higher percentage of WordPress enthusiasts answering questions over there.