Wordpress function for my STYLE.CSS and my main JS to add query string
$10-30 USD
Lukket
Slået op cirka 7 år siden
$10-30 USD
Betales ved levering
My main [login to view URL] uses this function: [login to view URL]
So my style query string changes on each mod I do to the file like: [login to view URL]:i:ss
My html ends up being like this:
<link rel='stylesheet' id='prefix-styles-css' href='[login to view URL]:i:ss' type='text/css' media='all'/>
I need a wp_enqueue_scripts function to do this better:
<link rel="preload" href="/wp-content/themes/site/[login to view URL]" as="style" onload="this.rel='stylesheet'"><noscript><link rel="stylesheet" href="/wp-content/themes/site/[login to view URL]"></noscript>
So I need:
1) A wp_enqueue_scripts for this. To display that format with the last mod date of the [login to view URL] so its cache-buster working.
2) I have a JS as well for all my js:
/wp-content/themes/SITE/js/[login to view URL]
I want it also to have a cache buster wp_enqueue_scripts for this JS, so it will be displayed in my HTML head as:
<script type='text/javascript' src="/wp-content/themes/site/js/[login to view URL]" async></script>