-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
32 lines (29 loc) · 884 Bytes
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since 1.0.0
*/
function theme_name_setup() {
add_theme_support('post-thumbnails');
add_theme_support('title-tag');
add_theme_support('menus');
add_theme_support('custom-logo');
add_theme_support('html5', ['comment-list', 'comment-form', 'search-form', 'gallery', 'caption']);
add_theme_support('wp-block-styles');
add_theme_support('responsive-embeds');
// add_theme_support('woocommerce'); Uncomment if using WooCommerce
register_nav_menus([
'primary' => __('Primary', 'twtheme'),
]);
}
add_action('after_setup_theme', 'theme_name_setup');
/**
* Enqueue the stylesheet.
*
* @since 1.0.0
*/
function theme_name_styles() {
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'theme_name_styles');