- This topic has 5 replies, 3 voices, and was last updated 9 years, 1 month ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I inline my above the fold/critical css to render faster my website but I want to move my:
<link rel='stylesheet' id='genesis-css' href='http://www.domain.com/wp-content/themes/genesis/style.css?ver=2.0.20150107' type='text/css' media='all' />
to the footer rather to have it in the head to optimize even further my rendering of the page
How can I do this? any easy way via functions.php?
According to Google CSS in the document body adversely impacts rendering performance, moving it out of head would put it in body.
My techy blog WordPress and stuff badlywired.com
To the footer I meant
Is there a way? To test it, im using autoptimize and it puts it in the footer but ads it as a nonscript and wanna move it myself better
Im already inlinin the critical above the fold css, why would it be a bad idea to load the style.css later on?
Anyhow whats the easiest way to do it
you may change wp_enque_script ot wp_enque_style to wp_footer for you function loading css in functions.php
SAMPLE, must check for your theme:
remove_action( 'wp_enque_script', 'genesis-css' );
add_action( 'wp_footer', 'genesis-css' );
Then check source code for css load place
© 2024 WPEngine, Inc.