I've created a page named "homepage", set the page as front page from Reading > Static Page > Front page
and it's nearly working fine. The issue I'm having the blog posts aren't included into the page. It comes with the blank page and I need to change order as "menu_order", not working.
In other words, I need to get the pages in order as same as the navigation.
<?php
/**
* The main template file.
*
* Template Name: One
*/
get_header();
$pages = get_posts(array(
'posts_per_page' => -1,
'post_type' => 'page',
'order' => 'ASC'
));
foreach($pages as $_post) {
$content = apply_filters('the_content', $_post->post_content);
$title = $_post->post_title;
$slug = $_post->post_name;
?>
-div class content-
<?php
}
get_footer(); ?>