Using Duotone outside singles | WordPress.org

[ad_1]

Hello this is a question about duotone and its internal mechanic.

If I remember well, since WP 5.9, duotone CSS and SVG in not output anymore in all pages, but only on singles and only for the specific duotone used in some images.
This is really great, thanks for that.

But. Before 5.9, I’ve developed a website using duotone when hovering on some link with img child in archive pages.

And with 5.9, this effect has been broken. Not so important though.
Now I’m trying to fix this in my spare time, and I’m wondering how to echo specific CSS and SVG of a given duotone sets in my theme.json in any page of the website to have back the hover effect ?

It seems duotone class in not called in archive pages, and I’m not sure how to use it to output_footer_assets()

Thank you !

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer