-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
91 lines (66 loc) · 2.61 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
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
83
84
85
86
87
88
89
90
91
<?php
// *********** Enqueue CSS
function load_css() {
wp_enqueue_style ('bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css');
wp_enqueue_style ('fonts', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,300italic,400italic,600italic,700italic' );
wp_enqueue_style ('master', get_stylesheet_directory_uri() . '/css/master.css');
wp_enqueue_style ('overrides', get_stylesheet_directory_uri() . '/style.css');
}
add_action('wp_enqueue_scripts', 'load_css');
// *********** Enqueue JS
function load_js() {
wp_enqueue_script ('jquery');
wp_enqueue_script ('bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', array('jquery'), null, true);
wp_enqueue_script ('fitvids', get_stylesheet_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), null, true);
wp_enqueue_script ('scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), null, true);
}
add_action('wp_enqueue_scripts', 'load_js');
// *********** Register menu
function register_menus() {
register_nav_menus(array(
'main-nav' => __('Main Nav'),
));
}
add_action( 'init', 'register_menus' );
// *********** Include the menu walker
require_once('inc/wp_bootstrap_navwalker.php');
// *********** Title tag
add_theme_support( 'title-tag' );
// *********** Thumbnails
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'tab-feature', 400, 200, true );
add_image_size( 'small-thumb', 120, 120, true );
};
// *********** Register widgets for sidebar/footer
function ht_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer 1', 'opengov' ),
'id' => 'footer-1-widget-area',
'description' => __( 'Footer 1 widget area', 'opengov' ),
'before_widget' => '<div class="widget-box">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer 2', 'opengov' ),
'id' => 'footer-2-widget-area',
'description' => __( 'Footer 2 widget area', 'opengov' ),
'before_widget' => '<div class="widget-box">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer 3', 'opengov' ),
'id' => 'footer-3-widget-area',
'description' => __( 'Footer 3 widget area', 'opengov' ),
'before_widget' => '<div class="widget-box">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'ht_widgets_init' );
?>