-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
46 lines (29 loc) · 1.1 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
<?php
function newTheme_setup(){
// This is for adding customized image sizes
add_image_size('smaller', 170, 100, true);
add_image_size('regular', 231, 100, true);
}
add_action('after_setup_theme', 'newTheme_setup');
// Adding styles and scripts
function newTheme_styles(){
// The main styles sheet
wp_enqueue_style('style', get_stylesheet_uri(), array(), '1.0.0');
wp_enqueue_style('header', get_template_directory_uri() . '/css/header.css', array(), '1.0.0');
wp_enqueue_style('footer', get_template_directory_uri() . '/css/footer.css', array(), '1.0.0');
}
add_action('wp_enqueue_scripts', 'newTheme_styles');
// Adding new menus
function newTheme_menus(){
register_nav_menus(
array(
'main_menu' => __('Main menu', 'newTheme'),
'secondary_menu' => __('Secondary menu', 'newTheme')
));
}
add_action('init', 'newTheme_menus');
// Adding fontAwesome icons
add_action( 'wp_enqueue_scripts', 'enqueue_load_fa' );
function enqueue_load_fa() {
wp_enqueue_style( 'load-fa', 'https://use.fontawesome.com/releases/v5.3.1/css/all.css' );
}