Commit 48211114 authored by Michael Iseard's avatar Michael Iseard
Browse files

Add template theme colour to root styles

parent c8f4d529
......@@ -261,3 +261,27 @@ add_action('init', function () {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
});
// Add root styles depending on template
add_action('wp_head', function () {
global $template;
$template = basename($template);
switch ($template) {
case 'template-faq.blade.php':
$color = '#2ec4b6';
break;
case 'page.blade.php':
$color = '#ff9f1c';
break;
default:
$color = 'transparent';
}
echo "<style>
:root {
--kudos-page-theme: $color;
}
</style>";
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment