-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·82 lines (65 loc) · 2.12 KB
/
functions.php
File metadata and controls
executable file
·82 lines (65 loc) · 2.12 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
78
79
80
81
82
<?php
/**
* Theme setup.
*/
function nothing_theme_setup()
{
// 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');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
// Switch default core markup for search form, comment form, and comments to output valid HTML5.
add_theme_support(
'html5',
array(
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
// Support for block-based widgets and styles.
add_theme_support('wp-block-styles');
// Support for wide-aligned blocks.
add_theme_support('align-wide');
// Enqueue editor styles.
add_editor_style('style.css');
// Enable custom logo upload (Appearance → Customize → Site Identity).
add_theme_support('custom-logo');
// Make embedded content (YouTube, Vimeo) responsive for mobile.
add_theme_support('responsive-embeds');
// Enable custom background color/image (Appearance → Customize).
add_theme_support('custom-background');
// Register navigation menu locations.
register_nav_menus(array(
'primary' => __('Primary Menu', 'nothing-theme'),
'footer' => __('Footer Menu', 'nothing-theme'),
));
// Enable Elementor Theme Builder (header, footer, archives, etc.)
add_theme_support('elementor_theme_locations');
}
add_action('after_setup_theme', 'nothing_theme_setup');
/**
* Enqueue scripts and styles.
*/
function nothing_theme_enqueue_styles()
{
wp_enqueue_style('nothing-style', get_stylesheet_uri());
// Enqueue comment-reply script.
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}
add_action('wp_enqueue_scripts', 'nothing_theme_enqueue_styles');
/**
* Ensure Elementor's "Hide Title" feature works correctly.
*/
function nothing_theme_elementor_title_config( $settings ) {
$settings['page_title_selector'] = 'h1.entry-title';
return $settings;
}
add_filter( 'elementor/controls/module/page_settings/after_section_end', 'nothing_theme_elementor_title_config' );