Last active
February 1, 2019 05:03
-
-
Save Edwardtonnn/aaebe53f6f89b1ff13bc5dadcf5f33f3 to your computer and use it in GitHub Desktop.
Enqueu Style w Timestamp
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 load_style(){ | |
// How to load an external style | |
wp_enqueue_style('fonts-css', 'https://fonts.googleapis.com/css?family=Open+Sans|Valera+Round'); | |
// How to load internal stylesheet | |
// Notice the get the time parameter near the end. This allows for clearly identifying when the css file has been loaded | |
// Only use get_the_time() when in development | |
wp_enqueue_style( 'main', get_stylesheet_uri(), ['font-css'], get_the_time()); | |
} | |
// Note that when you add an action you say wp enqueue scripts NOT styles | |
add_action('wp_enqueue_scripts','load_style'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment