-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
28 lines (23 loc) · 1.4 KB
/
functions.php
File metadata and controls
28 lines (23 loc) · 1.4 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
<?php # telling wordpress to load css file
function university_files(){
wp_enqueue_style('university_main_styles', get_stylesheet_uri());
// nickname to style.css, location that point toward the file
wp_enqueue_style('custom-google-fonts', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
wp_enqueue_script('googleMap', '//maps.googleapis.com/maps/api/js?key=yourkeygoeshere', NULL, '1.0', true);
wp_enqueue_script('main-university-js', get_theme_file_uri('/build/index.js'), array('jquery'), '1.0', true);
wp_enqueue_style('our-main-styles-vendor', get_theme_file_uri('/build/index.css'));
wp_enqueue_style('our-main-styles', get_theme_file_uri('/build/style-index.css'));
wp_localize_script('main-university-js', 'universityData', array(
'root_url' => get_site_url(),
'nonce' => wp_create_nonce('wp_rest')
));
}
add_action('wp_enqueue_scripts', 'university_files');
//at which moment to call, the name of the function the wordpress has to call
//at specific moment
function university_features(){
add_theme_support('title-tag');
}
add_action('after_setup_theme', 'university_features');
?>