Using a share counter in Webflow CMS ⛽

Rough steps (use on collection template page only):

  1. Add class total-shares to an element:

     <div class="total-shares">0</div>
    
  2. Go to the collection template Page Settings > Custom Code. Paste this in the Footer Code.

     <script>
     var Webflow = Webflow || [];
     Webflow.push(function() {
       $.getScript('https://cdn.rawgit.com/Julienh/Sharrre/master/jquery.sharrre.min.js', function() {
         $('.total-shares')
           .sharrre({
             title: '',
             url: window.location,
             share: {
               facebook: true,
               digg: true,
               delicious: true,
               linkedin: true,
             },
             buttons: {
               facebook: true,
               digg: true,
               delicious: true,
               linkedin: true,
             },
             render: function (api, options) {
               $(api.element).text(options.total);
             },
           });
         setInterval(function() { $('.total-shares .buttons').remove(); }, 200);
       });
     });
     </script>
    
  3. Publish site

Demo: Is Your Child Sleeping Enough? | Singapore's Child