How to exclude cache
-
Hello!
I include CSS styles in functions.php depending on cookies. How can I prevent the css block <link rel = “stylesheet” href = “/ wp-content / themes / flatsome-child / customstyles.css” /> from being cached?Included ESI, tried different markup in html, but it doesn’t work.
I connect CSS like this:
if ($ tempBlock == 1)
{add_action (“wp_head”, “wp_head_extra_code”);
function wp_head_extra_code () {echo ‘<link rel = “stylesheet” href = “/ wp-content / themes / flatsome-child / customstyles.css” />’;
}
- The topic ‘How to exclude cache’ is closed to new replies.