-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
49 lines (45 loc) · 1.84 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
<?php
// Add scripts and stylesheets
function include_investingwell_scripts() {
wp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/font-awesome/css/font-awesome.min.css' );
wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css' );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', false, NULL, 'all' );
wp_enqueue_style( 'main', get_template_directory_uri() . '/css/main.css' );
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery.min.js', false, NULL, true );
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );
wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', '', '1.0', true);
}
add_action( 'wp_enqueue_scripts', 'include_investingwell_scripts' );
// Register Custom Navigation Walker
require_once('wp-bootstrap-navwalker.php');
// Bootstrap navigation
function bootstrap_nav()
{
wp_nav_menu( array(
'theme_location' => 'header-menu',
'depth' => 2,
'container' => 'false',
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
);
}
function menus() {
register_nav_menus(
array(
'header-menu' => __( 'Header Menu' ),
'footer-menu' => __( 'Footer Menu' )
)
);
}
add_action( 'init', 'menus' );
// Remove comments links from admin bar
function df_disable_comments_admin_bar() {
if (is_admin_bar_showing()) {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
}
add_action('init', 'df_disable_comments_admin_bar');
?>