caldera_forms_force_enqueue_styles_early

Caldera Forms Banner

When loading the page Caldera Forms checks if any Caldera Forms shortcodes are used in post content, or if any Caldera Forms widgets are in use. If so, the CSS styles used by Caldera Forms will be loaded in the header. We do this check so that we don’t have to load our CSS on every page, including those with out forms.

This is generally sufficient, but if you are not using the shortcode, or are using the shortcode some where other than post content, Caldera Forms styles will be loaded in the footer.

If you wish you can force these styles to load using the caldera_forms_force_enqueue_styles_early filter

Where Does This Code Go?

When using WordPress hooks to customize Caldera Forms or other plugins you should not modify the plugin files, or you will lose your changes when you update the plugin. Instead you should create a small plugin to hold the custom code. It's easy, learn how here.

Technically you can add the custom code to your theme's functions.php, but then you will not be able to change your theme and keep these customizations.

Learn More