I need to add custom inline styles to the header of a custom theme I'm creating. I've come across the
wp_add_inline_style() function, which works but doesn't really suit me as it depends of a specific stylesheet. I'd need to add inline styles at the end of the head tag without a stylesheet dependency.
I've tried to set either the theme stylesheet or a non-existent one. In both cases, it works but it's a bit of a dirty hack IMO (either load the theme stylesheet twice or refer to a ghost file...). Is there a proper way to add inline styles in head without depending of a stylesheet?
Of course, I could add them directly in the header.php file but I'd like to avoid this.