Hi digiblogger, thanks for the feedback, will definitely consider adding these in a future update. Quick questions:
1) For “Support to show taxonomies count in a given cpt”, have you tried this:
[sbs_tax tax="post_tag"]
2) For “Move the text output inside shortcode”, not sure I understand.. can you give an example?
Thanks π
Hi.
For 1) i havn’t. But what will happen if a taxonomy x is in cpt y and cpt z but I only want to count appearances in cpt z?
For 2) well as an example, i can count products.
but products must not be named products but for example games or hardware or something.
Shortcode: [sbs_cpt cpt=”products” singular=Game” plural=”Games
OUTPUT : 1 Game or 2 Games
For 1), thanks I will investigate and see if this is possible or maybe add some functionality if needed.
For 2), I like the idea of singular or plural, will try to implement something similar. As explained in the documentation, currently you can display only the number for certain shortcodes using txt attribute for example:
[sbs_cpt_count cpt="post" txt="null"]
So if you know that a CPT has more than one item, you can just display the number and add your own text. Not sure if that applies to the shortcode you want to use, let me know.
Just to follow up on this after looking closer at CPTs and custom taxonomies. You ask:
“…what will happen if a taxonomy x is in cpt y and cpt z but I only want to count appearances in cpt z?”
Any taxonomy that is in multiple CPTs will have the same number of terms. For example if you have a “Book” taxonomy that is enabled in both CPTs say “Libraries” and “Stores”, the terms will be identical for both. This means that the current plugin shortcode to display the count of taxonomy terms, [sbs_tax tax=""], works for any taxonomy regardless of the CPT(s) to which it belongs.
I hope this helps, feel free to post again with any further questions or feedback, etc. Thank you.