$pages = get_pages();
foreach ($pages as $page_data) {
$content = apply_filters('the_content', $page_data->post_content);
$title = $page_data->post_title;
echo $content;
}
I want this code to be changes so i can create a one page website and show only those pages i need to show on front page.
You can make use of the
include
parameter to include only the pages you need. Note, this parameter takes an array or a comma separated string of page ID’sYou can try the following to only show pages 1, 2 and 3