• Resolved digiblogger

    (@digiblogger)


    Hi there,

    I like your plugin. But as everything, it could be better ?? let me help?

    • Support to show taxonomies count in a given cpt
    • Support to show custom fields count in agiven cpt
    • Move the text output inside shortcode (not on every site, a product is called product *smile*)
    • Count deeper: Taxonomies and fields can generally be set for more than one cpt (standard categories too, btw.). So a shortcode like: field=”my_field” post_type=”products” would be awesome
    • Support for woocommerce attributes

    ?? and please continue your great work

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    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 ??

    Thread Starter digiblogger

    (@digiblogger)

    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

    Plugin Author Jeff Starr

    (@specialk)

    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.

    Plugin Author Jeff Starr

    (@specialk)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support for Taxonomies and fields’ is closed to new replies.