Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[WordPress] Show Page Content Inside Page
function my_show_page($atts) {
extract(shortcode_atts(array('page_id' => 0), $atts));
$page = get_page($page_id);
return apply_filters('the_content', $page->post_content);
add_shortcode('my_show_page', 'my_show_page');
// [my_show_page page_id="999"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.