diff --git a/inc/Core.php b/inc/Core.php index 666109f..9aee36a 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -65,6 +65,9 @@ private function run_hooks() { public function setup() { load_theme_textdomain( 'raft', RAFT_DIR . '/languages' ); + $starter_content = new Starter_Content(); + + add_theme_support( 'starter-content', $starter_content->get() ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); diff --git a/inc/Starter_Content.php b/inc/Starter_Content.php new file mode 100644 index 0000000..8723130 --- /dev/null +++ b/inc/Starter_Content.php @@ -0,0 +1,67 @@ + array( + 'primary' => array( + 'items' => array( + 'home' => array( + 'type' => 'post_type', + 'object' => 'page', + 'object_id' => '{{' . self::HOME_SLUG . '}}', + ), + 'page_blog' => array( + 'type' => 'post_type', + 'object' => 'page', + 'object_id' => '{{' . self::BLOG_SLUG . '}}', + ), + ), + ), + ), + 'options' => array( + 'page_on_front' => '{{' . self::HOME_SLUG . '}}', + 'page_for_posts' => '{{' . self::BLOG_SLUG . '}}', + 'show_on_front' => 'page', + ), + 'posts' => array( + self::BLOG_SLUG => array( + 'post_name' => self::BLOG_SLUG, + 'post_type' => 'page', + 'post_title' => self::BLOG_SLUG, + ), + self::HOME_SLUG => array( + 'post_type' => 'page', + 'post_title' => self::HOME_SLUG, + 'post_content' => ' + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

+ + ', + ), + ), + ); + } +}