Hi,
I use the code below to grab content from page 312 in my custom template. I'm wondering if I can use this template for many pages, but I need to use a function without any specific page ID as pages ID will be 312, 313, 314, etc...Something that grab the content of the page whatever is the page.
<?php
$page_id = 312;
$page_data = get_page( $page_id );
$content = $page_data->post_content;
$title = $page_data->post_title;
echo $page_data->post_content;
?>
Thanks