-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
22 lines (18 loc) · 1.13 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
<?php
function add_theme_scripts() {
// Haupt CSS Datei einbinden (style.css)
wp_enqueue_style( 'style', get_stylesheet_uri() );
// Eigene CSS-Dateien einbinden
// |-ID der Datei |-gibt den Pfad zum Theme-Root aus |- abhängigkeiten, Version (1.1), Media: all
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '5.3.3', 'all' );
wp_enqueue_style( 'main-css', get_template_directory_uri(). '/css/main.css', array(), '0.1', 'all' );
// Eigene JS-Dateien einbinden
// |-ID der Datei |-gibt den Pfad zum Theme-Root aus |- abhängigkeiten, Version (1.1), weitere dinge wie "async" möglich
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.bundle.min.js', array('jquery'), false, false);
wp_enqueue_script( 'main-script', get_template_directory_uri() . '/js/main.js', array(), false, false);
// if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
// wp_enqueue_script( 'comment-reply' );
// }
}
add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );
?>