Skip to main content

Posts

Showing posts from February, 2014

Get Post or Page Content By Id wordpress

Get Post or Page Content By Id wordpress <?php $page_id = 7; $page_data = get_page( $page_id ); $excerpt = apply_filters('the_excerpt', $page_data->post_content); $title = $page_data->post_title; $permalink = get_permalink($page_id); echo '<h2>' . $title . '</h2>'; echo $excerpt . '<br/>'; echo '<a href="' . $permalink . '">Read more</a>'; ?>