Hello,
Thank you for contacting Rank Math today.
You can create a custom var that gets the number of products in the current products category by using the following filter:
/**
* Filter to add custom variables
*/
add_filter( 'rank_math/vars/replacements', function( $vars ) {
return $vars;
});
Looking forward to helping you. Thank you.
Hello,
We are super happy that this helped you with your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.