This repository has been archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
71 lines (48 loc) · 1.71 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
<?php
/**
* Register Custom Navigation Walker
*/
function urn_material_scripts() {
// Load our main stylesheet.
wp_enqueue_style('main-style', get_stylesheet_uri());
wp_enqueue_script('listen-now', get_template_directory_uri() . '/js/listen-now.js', array('jquery'), false, true);
wp_enqueue_script('listen-now', get_template_directory_uri() . '/js/listen-now.js', array('jquery'), false, true);
// if ( is_home() || is_page ('schedule')) {
wp_enqueue_script('the-schedule', get_template_directory_uri() . '/js/schedule.js', array('jquery'), false, true);
//}
}
add_action( 'wp_enqueue_scripts', 'urn_material_scripts' );
function ourWidgetsInit(){
register_sidebar( array (
'name' => 'Sidebar',
'id' => 'sidebar1',
));
}
add_action('widgets_init', 'ourWidgetsInit');
function register_navwalker(){
require_once get_template_directory() . '/class-wp-bootstrap-navwalker.php';
}
add_action( 'after_setup_theme', 'register_navwalker' );
//register_my_menu
// Add the main nav header menu
function register_my_menu() {
register_nav_menu('header-menu', __( 'Header Menu' ));
register_nav_menu('footer-menu', __( 'Footer Menu' ));
}
add_action( 'init', 'register_my_menu' );
add_image_size('thumb_image', 500, 250, true);
add_theme_support( 'post-thumbnails', array( 'post', 'product' ) );
/**
* Shows our stylings inside of the Wordpress Post Editor (when writing a new post)
*
* Styles defined in editor-style.css
*/
add_theme_support('editor-styles');
add_editor_style( 'style-editor.css' );
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}
?>