Sometimes it can be useful to include in a page the contents of another. For example, if you created a registration page and volote show the information in a frame of privacy, it would be nice to upload this content to an existing page. This has the advantage:
- The client can change the content of the page without "tocccare" the original page that contains it
- The page works well on its own, so you can insert a link in the footer of the site to "privacy" for example
The best way to include the contents of one or more pages is as follows:
1 2 3 | get_page_by_title ( "Privacy" ) -> ID ; $ PostID = get_page_by_title ("Policy") -> ID; get_post ( & $postID ) ; $ Post = get_post (& $ postID); "the_content" , $post -> post_content ) ; echo apply_filters ('the_content', $ post -> post_content); |
The ID of the post (the page in the above example) is obtained by its title both for clarity and for compatibility with export reindicizzazioni or involuntary.






Latest Comments
Giovambattista Fazioli : @ ale: As shown @ Kevin see on GitHub repo: https://github.com/gfazioli/Ch roma-Key
Giovambattista Fazioli : @ Kevin: See https://github.com/gfazioli/Ch roma-Key
Kevin : Very nice example - would like to see the. fla too!
Ludovica : Hello! I'll explain my doubt. When I write a post not add pictures in the article (if so ...
Marco : hello @ Giovan Battista Fazioli, thanks for all the explanations of this excellent guide. I have a question to ...