Adding the productcount on top of shoppage
-
Hi there,
i would like to add a product count on top of my shop page (woocommerce) to show how much products are left when filtering. I added the following to my functions.php
// [product_count] shortcode function product_count_shortcode( ) { $count_posts = wp_count_posts( 'product' ); return $count_posts->publish; } add_shortcode( 'product_count', 'product_count_shortcode' );
And dropped that shortcode [product_count] on top of the page. Now it shows the ammount of products in total but i want something like when i filter the products it says something like “12 out of 300 products”. I know it was there once but for no reason it is not there anymore. Can i fix this by adding some kind of function or do you have any other solution?
-https://codepen.io/Sjoerd89/pen/zKOqRoThanks for your time,
Sjoerd
PS: The normal productcount is not there and no clue why because i think i had it in the beginning.
- The topic ‘Adding the productcount on top of shoppage’ is closed to new replies.