You might take a look at the issues regarding css in the footer here: https://wordpress.stackexchange.com/questions/162150/can-i-add-styles-to-footer-with-wp-styles-add-data
and here:
https://wordpress.stackexchange.com/questions/186065/how-to-load-css-in-the-footer
The whole purpose of css is to render the page as you wish it to appear. To call the loading of css “render blocking” is like displaying a painting as a jumble of components that gradually sort themselves out into the right places. Is that what you really want?
Thread Starter
mekeca
(@mekeca)
Google detects the plugin CSS as render blocking, in order to get better SEO I must place the css in the footer. It doesn’t affect the appearence of the website since i have loading. Nmv i edited the cookie-notice.php and on lane 2195 added a function around the wp_enqueue_style.
function add_cookie_style_to_footer() {
wp_enqueue_style( 'cookie-notice-front', plugins_url( 'css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
};
add_action( 'wp_footer', 'add_cookie_style_to_footer' );
That solved my problem, thanks for your time.