If you look at the source code, you can see that wp_enqueue_style( 'crayon' )
is called in Crayon::enqueue_resources()
which itself is called either from either Crayon::the_content()
or Crayon::wp_head()
. The code in Crayon::wp_head
is:
if (!CrayonGlobalSettings::val(CrayonSettings::EFFICIENT_ENQUEUE) || CrayonGlobalSettings::val(CrayonSettings::TAG_EDITOR_FRONT)) {
CrayonLog::debug('head: force enqueue');
// Efficient enqueuing disabled, always load despite enqueuing or not in the_post
self::enqueue_resources();
}
Which will enqueue the style only when certain settings are enabled. Otherwise, the style will only be enqueued from the_content
filter which fires after wp_head
has already been output.
So your two options are:
- Have the CSS enqueued on all pages in the header
- Have the CSS enqueued only on necessary pages but in the footer