-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
54 lines (46 loc) · 1.54 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
<?php
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
function theme_name_scripts() {
//wp_enqueue_style( 'style-materialize', // get_template_directory_uri().'/css/materialize.min.css');
wp_enqueue_style( 'style-materialize', get_template_directory_uri().'/css/bootstrap.min.css');
wp_enqueue_style( 'style-name', get_stylesheet_uri());
wp_enqueue_script('jquery1', get_template_directory_uri().'/js/jquery-3.0.0.min.js');
//wp_enqueue_script('materialize',/ get_template_directory_uri().'/js/materialize.min.js');
wp_enqueue_script('script', get_template_directory_uri().'/js/script.js');
}
add_action( 'after_setup_theme', 'theme_register_nav_menu' );
function theme_register_nav_menu() {
register_nav_menu( 'primary', 'Primary Menu' );
}
function deregister_cf7_styles() {
if ( !is_page(array(29)) ) {
wp_deregister_style('contact-form-7');
}
}
add_action('wp_print_styles', 'deregister_cf7_styles', 100);
function the_breadcrumb() {
if (!is_front_page()) {
echo '<a href="';
echo get_option('home');
echo '">Главная';
echo "</a> / ";
if (is_category() || is_single()) {
the_category(' ');
if (is_single()) {
echo " / ";
the_title();
}
} elseif (is_page()) {
echo the_title();
}
}
else {
echo 'Home';
}
}
add_theme_support( 'post-thumbnails' );
add_action('get_header', 'my_filter_head');
function my_filter_head() {
remove_action('wp_head', '_admin_bar_bump_cb');
}
?>