Last active
April 28, 2023 14:10
-
-
Save aslamatwebdevstudios/e41db3f53ace7d699f38fbea2efc84e5 to your computer and use it in GitHub Desktop.
Enqueue styles in Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_enqueue() { | |
$version = filemtime( get_stylesheet_directory() . '/css/styles.css' ) ; | |
wp_register_style( | |
'my_theme_main_css', | |
get_template_directory_uri() . '/css/styles.css', | |
array(), | |
$version | |
); | |
wp_enqueue_style( 'my_theme_main_css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment