Hello Magento Folks 👋,

Hope you all are doing great. Today I will show Magento 2: How To Display Count Of Product with Page Title on Category Page. Let’s not miss our last published blog, Magento 2: Add Track Order link with the Order on Order History Page.

By default, Magento 2 offers some default functionality to display the count of no. of products for a particular category on the category page with the toolbar.

But what if we want to display a count of no. of products as per our essentiality? No worries, with the help of the below code it is possible to display the count of products for a particular category as per our needs.

Here we have used display count with page main title. So, let us do 🚀

Steps to Display Count Of Product with Page Title on Category Page in Magento 2:

Step 1: To do this, create events.xml file inside  app\Code\Vendor\Extension\etc\ folder and add the below code:

Step 2: Next, create Productcount.php inside app\Code\Vendor\Extension\Observer\ folder and add the below code:

Step 3: Finally run the below command:

That’s it.

Conclusion:

Accordingly, all are able to Display Count Of Product with Page Title on Category Page in Magento 2. If you face any complications while executing the above code, write to me in the comment section below. Help your fellow Magento friends by sharing the code with them. See you again, until then stay tuned!

Happy Coding 😊

Click to rate this post!
[Total: 7 Average: 4.9]