• Hi,

    I’m using the Contextual Related Posts plugin to display related posts in the footer. How can I load the plugin’s CSS in the footer or defer/async it so I don’t get ‘Avoid chaining critical requests’ in PageSpeed Insights? Which of the 3 would be the best way to go – load the plugin’s CSS in the footer, defer or async?

Viewing 1 replies (of 1 total)
  • Plugin Author Ajay

    (@ajay)

    It loads the styles as per how it’s recommended in WordPress: https://github.com/WebberZone/contextual-related-posts/blob/v3.3.1/includes/header.php#L50

    I’ve been googling out regarding loading CSS in footer and it seems like you might need to remove_action( 'wp_enqueue_scripts', 'crp_heading_styles' ); and then add_action( 'get_footer', 'crp_heading_styles' );

    However, not one I have tried yet.

    Probably a better approach would be to use Autoptimize to combine and minimize CSS so you only have a single CSS file loading.

Viewing 1 replies (of 1 total)
  • The topic ‘Load CSS in footer’ is closed to new replies.