Inline and Defer CSS only on home page?
-
I’ve read autoptimize_helper.php_example and successfully used this code to disable Autoptimize on my blog, but enable it on my static home page:
function my_ao_noptimize() { if (strpos($_SERVER['REQUEST_URI'],'blog')!==false) { return true; } elseif (is_home()) { return false; } else { return true; } }
However, what I would really like to do is to use Autoptimize for the whole site, but enable “Inline and Defer CSS” for the home page only. Is there a filter that would allow me to use a conditional like the one above to enable Inline and Defer CSS only for one page? Thanks in advance.
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Inline and Defer CSS only on home page?’ is closed to new replies.