-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
77 lines (65 loc) · 2.03 KB
/
functions.php
File metadata and controls
77 lines (65 loc) · 2.03 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* WordPress Theme Starter Pack functions and definitions
*
* @package WordPress Theme Starter Pack
*/
if (!defined('_S_VERSION')) {
define('_S_VERSION', '1.0.0');
}
// Include modular files
require_once __DIR__ . '/inc/acf.php';
require_once __DIR__ . '/inc/cpts.php';
require_once __DIR__ . '/inc/template-functions.php';
require_once __DIR__ . '/inc/blocks.php';
require_once __DIR__ . '/inc/class-wp-bootstrap-navwalker.php';
/**
* Sets up theme defaults and registers support for various WordPress features.
*/
function wptsp_setup() {
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
// Let WordPress manage the document title.
add_theme_support('title-tag');
// Enable support for Post Thumbnails on posts and pages.
add_theme_support('post-thumbnails');
// Register navigation menus.
register_nav_menus(
array(
'primary' => esc_html__('Primary Menu', 'wptsp'),
'footer' => esc_html__('Footer Menu', 'wptsp'),
)
);
// Switch default core markup to output valid HTML5.
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
// Add theme support for selective refresh for widgets.
add_theme_support('customize-selective-refresh-widgets');
// Add support for core custom logo.
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
// Add support for Block Styles.
add_theme_support('wp-block-styles');
// Add support for full and wide align images.
add_theme_support('align-wide');
// Add support for responsive embedded content.
add_theme_support('responsive-embeds');
}
add_action('after_setup_theme', 'wptsp_setup');