-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
40 lines (32 loc) · 1.1 KB
/
Copy pathfunctions.php
File metadata and controls
40 lines (32 loc) · 1.1 KB
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
<?php
// error_reporting(E_ERROR | E_WARNING | E_PARSE);
function assets_path ($path) {
echo get_bloginfo('template_directory') . '/assets/' . $path;
}
add_action( 'wp_head', 'register_js_css', 0);
function register_js_css () {
if (!is_admin()) {
$dist = get_bloginfo('template_url') . '/dist';
// Register the JavaScript and CSS files
// HANDLE SOURCE DEP VERSION IN FOOTER?
wp_register_script('Scripts', $dist. '/website.bundle.js', null, '1.0.0', true);
wp_register_style('Styles', $dist. '/main.css', null, '1.0.0', 'all');
//load the scripts
wp_enqueue_script('Scripts');
wp_enqueue_style('Styles');
}
}
if ( function_exists ('register_sidebar')) {
register_sidebar(array(
'name' => 'Main Sidebar',
'id' => 'main-sidebar',
));
}
add_action( 'init', 'navigation_menus');
function navigation_menus () {
register_nav_menus(
array( 'main-menu' => __( 'Main Menu' ) )
);
}
add_theme_support( 'post-thumbnails');
remove_action('wp_head', 'wp_generator');