• Hello
    thanks again for your plugin.

    I am writing to you because I realized that all the css I insert in the plugin is reflected in the site header.
    I have inserted various snippets of css also divided by device, all this css in the header is not good, and apparently even google does not look favorably upon it.

    Can you tell me how I can not include it in the header?
    I am currently using this.

    add_action( ‘wp_head’, function () { ?>
    <style>
    /*my css*/
    </style>

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    The way CSS works is it needs to always be included in the site <head> area. It cannot be placed in the <body> area, though sometimes the browser will be forgiving and hoist it to the head for you, this shouldn’t be relied upon.

    If you are referring to inline CSS vs external CSS, then this is definitely a concern. Code Snippets 3 Pro will bring an entirely new snippet type for CSS that compiles all snippets into a minified stylesheet and links to it externally so it can be cached, as you describe. Stay tuned for when Code Snippet 3 is released sometime this year.

Viewing 1 replies (of 1 total)
  • The topic ‘Css in the header’ is closed to new replies.