G
G
German Zuiakov2020-11-17 03:21:08
WordPress
German Zuiakov, 2020-11-17 03:21:08

How can I make the favicon show the number of items in the cart?

5fb3172ad1681940026916.jpeg
Maybe there are some articles or lessons on how to do this based on woocmmerce, I know that there is a paid plugin for such a task, but the Jewish part of my body does not want to pay 10 dollars for it)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-11-17
@HermanZuiakov

Make an icon
Make an icon 1
....
Make an icon 9
Make an icon a lot
Take this plugin as a basis and rewrite it for your basket
https://wordpress.org/plugins/wp-favicon-remover/
Or dynamically

(function() {
    var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
    link.type = 'image/x-icon';
    link.rel = 'shortcut icon';
    link.href = 'http://www.stackoverflow.com/favicon.ico';
    document.getElementsByTagName('head')[0].appendChild(link);
})();

https://stackoverflow.com/questions/260857/change...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question