-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
110 lines (101 loc) · 3.65 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
// Require do arquivo customizer
require_once get_template_directory() . '/inc/customizer.php';
// Carregando nossos scripts e folhas de estilos
function load_scripts(){
wp_enqueue_script( 'bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',
array( 'jquery' ), '4.0.0', true );
wp_enqueue_style( 'font-awesome', 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css',
array(), '4.7.0', true );
wp_enqueue_style( 'bootstrap-css', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css',
array(), '4.0.0', 'all' );
wp_enqueue_style( 'template', get_template_directory_uri() . '/css/template.css',
array(), '1.0', 'all' );
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css',
array(), '1.1', 'all' );
}
add_action( 'wp_enqueue_scripts', 'load_scripts' );
// Função de Configuração do Tema
function wphahamu_config(){
// Registrando nossos menus
register_nav_menus(
array(
'my_main_menu' => 'Main Menu',
'footer_menu' => 'Footer Menu'
)
);
// Adicionando suporte ao tema
$args = array(
'height' => 225,
'width' => 1920
);
add_theme_support( 'custom-header', $args );
add_theme_support( 'post-thumbnails' );
add_image_size( 'single-post-thumbnail', 1024, 800 );
add_theme_support( 'post-formats', array( 'video', 'image' ) );
add_theme_support('title-tag');
add_theme_support('custom-logo', [
'height' => '110',
'width' => '200'
]);
}
add_action( 'after_setup_theme', 'wphahamu_config', 0 );
// Registrando Sidebars
add_action('widgets_init', 'wp_sidebar');
function wp_sidebar(){
register_sidebar([
'name' => 'Home Page Sidebar',
'id' => 'sidebar-1',
'description' => 'Sidebar to be usesd on Home Page',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
register_sidebar([
'name' => 'Blog Sidebar',
'id' => 'sidebar-2',
'description' => 'Sidebar to be usesd on Blog Page',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
/* Our Services */
register_sidebar([
'name' => 'Services 1',
'id' => 'services-1',
'description' => 'Sidebar to be usesd on Services 1',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
register_sidebar([
'name' => 'Services 2',
'id' => 'services-2',
'description' => 'Sidebar to be usesd on Services 2',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
register_sidebar([
'name' => 'Services 3',
'id' => 'services-3',
'description' => 'Sidebar to be usesd on Services 3',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
register_sidebar([
'name' => 'Slide',
'id' => 'slide-1',
'description' => 'Widget para adicionar Shortcode do Slide',
'before_widget' => '<div class="widget-wrapper">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
]);
}