Created
June 16, 2011 13:16
-
-
Save veganista/1029209 to your computer and use it in GitHub Desktop.
Loading another page's content in wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$page = get_page_by_path('page-parts/testimonials-intro'); | |
//echo do_shortcode($page->post_content); | |
echo do_shortcode(wpautop($page->post_content)); // this will add the paragaphs automatically this can be a bit more useful than the above | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment