Created
January 20, 2017 15:04
-
-
Save websupporter/e3dfd9f41374757baf8f38afdf672190 to your computer and use it in GitHub Desktop.
For my blogpost http://websupporter.net/blog/de/starter-content-fuer-themes/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'after_setup_theme', 'theme_start_content' ); | |
function theme_starter_content() { | |
add_theme_support( 'starter-content', array( | |
'posts' => array( | |
'home', | |
'test' => array( | |
'post_type' => 'page', | |
'post_title' => _x( 'Das ist ein Test', 'theme-slug' ), | |
'post_content' => _x( 'Hier habe ich eine Testseite angelegt.', 'theme-slug' ), | |
), | |
), | |
'options' => array( | |
'show_on_front' => 'page', | |
'page_on_front' => '{{home}}', | |
'page_for_posts' => '{{test}}', | |
), | |
'theme_mods' => array( | |
'color' => '#f00', | |
), | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment