Code

Number of CMS Item Count

A simple way of displaying the number of CMS items on a page in Webflow. If you ever wanted to add a CMS item count on a page this script will allow you to easily display the total number of items shown.

Number of CMS Item Count preview

A simple way of displaying the number of CMS items on a page in Webflow. If you ever wanted to add a CMS item count on a page this script will allow you to easily display the total number of items shown.

How to add it

  1. Add the Javascript code snippet to the closing body custom code settings.

The code

Javascript
                      <!-- Add to body close section -->
<script>
$(document).ready(function() {

	const itemcounter = $('.collection-item-class').length;
	$('.display-the-number-heading').text(itemcounter); 
	
});
</script>

                    

Browse similar code snippets

Language

More from Timothy Ricks

Profile →

Related Webflow questions

All answers →

Similar code snippets

All code snippets →