Using wp_add_inline_style Inside a Template File
Conceptually wp_add_inline_style adds some lines as if they were concatenated to a style file. This means that your setup will only work if you are adding the inline style to a style file loaded in the footer, because by the time you are calling add_inline_style in a template the header has already been assembled. That … Read more