Moving Appointments CSS to footer

I am working on my google pagespeed and it is saying that the css for the appointments plugin is render blocking in its current position I have a function that moves all css and js to the footer and that seems to work good for everything but the css for this plugin. Below is the code Im using to move the css and js what do I need to change to have this move as well

remove_action( 'wp_head', 'wp_print_scripts' );
remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
add_action( 'wp_footer', 'wp_print_scripts', 5 );
add_action( 'wp_footer', 'wp_enqueue_scripts', 5 );
add_action( 'wp_footer', 'wp_print_head_scripts', 5 );

This is the item still in my header
<link rel="stylesheet" id="appointments-css" href="/wp-content/plugins/appointments/css/front.css?ver=1.5.2" type="text/css" media="all">

  • Tyler Postle

    Hey James,

    Hope you're doing well today!

    Sometimes when something like CSS/Js is loaded in the header it's for a good reason and there could be other areas expecting it to be loaded there and when it doesn't then it might cause issues.

    This could be the case here, I'm going to flag one of our developers just to make sure - so you don't experience any problems later on.

    While this explanation isn't specific to our plugin, it does do a good job of explaining why it's not always a bad thing when something is loaded in the header: https://zencache.com/kb-article/why-doesnt-zencache-move-cssjs-into-the-footer/

    Anyways, either myself or the developer will reply back here on whether we can do this or not and how to do it if we can :slight_smile:

    Talk to you soon!

    Cheers,
    Tyler

    PS. Keep in mind the majority of our developers take weekends off so a reply back may be a little slower than normal.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.