-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
57 lines (44 loc) · 1.59 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
<?php
function setup() {
require 'inc/general/class-Upbootwp_Walker_Nav_Menu.php';
add_theme_support( 'post-thumbnails' );
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'Bootstrap WP Primary' ),
) );
/**
* Enable support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
/**
* Setup the WordPress core custom background feature.
*/
// add_theme_support( 'custom-background', apply_filters( 'upbootwp_custom_background_args', array(
// 'default-color' => 'ffffff',
// 'default-image' => '',
// )));
}
add_action( 'after_setup_theme', 'setup' );
/**
* Register widgetized area and update sidebar with default widgets
*/
function upbootwp_widgets_init() {
register_sidebar(array(
'name' => __('Sidebar','upbootwp'),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
));
}
add_action( 'widgets_init', 'upbootwp_widgets_init' );
function theme_styles() {
wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'theme_styles' );
function upbootwp_scripts() {
wp_enqueue_script( 'upbootwp-jQuery', get_template_directory_uri().'/js/jquery.js');
wp_enqueue_script( 'upbootwp-basefile', get_template_directory_uri().'/js/bootstrap.min.js');
}
add_action( 'wp_enqueue_scripts', 'upbootwp_scripts' );