Skip to content

Instantly share code, notes, and snippets.

@veganista
Created June 16, 2011 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veganista/1029209 to your computer and use it in GitHub Desktop.
Save veganista/1029209 to your computer and use it in GitHub Desktop.
Loading another page's content in wordpress
<?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