Get page content by page id (WordPress) or shortcode use

Posted: December 26, 2014 in All Category, WordPress

function get_data($pageinfo)
{
$pid = $pageinfo['id'];
$page_data = get_page( $pid );
return apply_filters('the_content', $page_data->post_content);

}
add_shortcode( 'show_page', 'get_data' );

//use admin as like this

[show_page id="page id"]
Advertisements

Comments are closed.