-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
74 lines (53 loc) · 1.67 KB
/
Copy pathfunctions.php
File metadata and controls
74 lines (53 loc) · 1.67 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
<?php
// Load Stylesheets
function load_css() {
wp_register_style(
'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css',
array(), false, 'all');
wp_enqueue_style('bootstrap');
wp_register_style(
'main', get_template_directory_uri() . '/css/main.css',
array(), false, 'all');
wp_enqueue_style('main');
}
add_action('wp_enqueue_scripts', 'load_css');
// Load JavaScript
function load_js() {
wp_enqueue_script('jquery');
wp_register_script('bootstrap-scripts', get_template_directory_uri() . '/js/bootstrap.min.js',
'jquery', false, true);
wp_enqueue_script('bootstrap-scripts');
}
add_action('wp_enqueue_scripts', 'load_js');
// Theme Options
add_theme_support('menus');
add_theme_support('post-thumbnails');
// Menus
register_nav_menus(
array(
'top-menu' => 'Top Menu Location',
'mobile-menu' => 'Mobile Menu Location',
'footer-menu' => 'Footer Menu Location',
)
);
// Custom Image Sizes
add_image_size('blog-large', 800, 400, true);
add_image_size('blog-small', 300, 200, true);
remove_image_size('1536x1536');
remove_image_size('2048x2048');
remove_image_size('medium');
remove_image_size('medium_large');
update_option( 'medium_size_h', 0 );
update_option( 'medium_size_w', 0 );
update_option( 'medium_large_size_w', 0 );
update_option( 'medium_large_size_h', 0 );
function remove_default_image_sizes( $sizes) {
unset( $sizes['large']); // Added to remove 1024
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['medium_large']);
unset( $sizes['1536x1536']);
unset( $sizes['2048x2048']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'remove_default_image_sizes', 20);