Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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' ),
),
),
'nav_menus' => array(
'top' => array(
'name' => __( 'Top Menu', 'theme-slug' ),
'items' => array(
'page_home',
array(
'type' => 'post_type',
'object' => 'page',
'object_id' => '{{test}}',
),
array(
'url' => 'http://websupporter.net/',
'title' => x( 'Externer Link', 'theme-slug' ),
),
),
),
)
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment