Home › Forums › Support › Load css below Critical CSS This topic has 5 replies, 3 voices, and was last updated 4 years ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts March 18, 2019 at 7:23 am #842265 Anders Nielsen Hi When looking in the source code, I can see that the CSS is put before the critical CSS part. I’m using autoptimize. How to set the CSS file to load after the critical CSS so it won’t be renderblocking? GeneratePress 2.2.2GP Premium 1.7.8 March 18, 2019 at 9:08 am #842348 DavidStaff Customer Support Hi there, might be worth you asking the Autoptimize developer, as it’s his plugin doing that he would be better placed to advise. let me know. Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ March 18, 2019 at 11:49 am #842475 Anders Nielsen ok, I found a solution from the developer.. But when I insert it ind the functions.php the site fails https://wordpress.org/support/topic/how-can-i-send-the-concatenated-css-file-to-the-footer/ add_filter(‘autoptimize_filter_css_replacetag’,’te_css_replacetag’,10,1; function te_css_replacetag($replacetag) { return array(“</body>”,”before”); } Do you any idea why? March 18, 2019 at 5:55 pm #842776 TomLead Developer Lead Developer What do you mean by fails? Do you get a specific error? Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development March 19, 2019 at 10:17 pm #844061 Anders Nielsen Parse error: syntax error, unexpected ‘;’, expecting ‘,’ or ‘)’ in /var/www/xxx.dk/xxx.dk/wp-content/themes/generatepress/functions.php on line 99 March 20, 2019 at 5:12 am #844321 DavidStaff Customer Support Hi there, can you remove it from your function file and try adding the code using the Code Snippets plugin, a link to which is provided in here: https://docs.generatepress.com/article/adding-php/ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In