-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
24 lines (20 loc) · 773 Bytes
/
functions.php
File metadata and controls
24 lines (20 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
// Enqueue styles and scripts
function business_theme_scripts() {
// Main stylesheet
wp_enqueue_style('business-theme-style', get_stylesheet_uri());
// Google Fonts
wp_enqueue_style('business-google-fonts', 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
// Custom JS
wp_enqueue_script('business-theme-script', get_template_directory_uri() . '/js/main.js', array(), '1.0.0', true);
}
add_action('wp_enqueue_scripts', 'business_theme_scripts');
// Add theme support
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
// Force template detection refresh
function refresh_templates() {
$theme = wp_get_theme();
$theme->cache_delete();
}
add_action('admin_init', 'refresh_templates');