create initial theme
This commit is contained in:
commit
5c8561558d
33
functions.php
Normal file
33
functions.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// enqueue styles
|
||||
|
||||
add_action('wp_enqueue_scripts', 'slowtwitch_register_styles');
|
||||
|
||||
function slowtwitch_register_styles() {
|
||||
wp_enqueue_style('slowtwitch-styles', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get('version'), 'all');
|
||||
}
|
||||
|
||||
// set up menu areas
|
||||
|
||||
add_action( 'init', 'slowtwitch_menus' );
|
||||
|
||||
function slowtwitch_menus() {
|
||||
$locations = array(
|
||||
'primary' => 'Primary Menu',
|
||||
'footer' => 'Footer Menu'
|
||||
);
|
||||
|
||||
register_nav_menus($locations);
|
||||
}
|
||||
|
||||
add_action( 'widgets_init', 'my_widgets_init' );
|
||||
|
||||
function my_widgets_init() {
|
||||
|
||||
register_sidebar( array(
|
||||
'id' => 'slowtwitch-front-page',
|
||||
'name' => 'Widgets for Front Page',
|
||||
) );
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user