• Resolved dlikelith

    (@dlikelith)


    Hello

    Would it be possible for your to provide any help (like tutorial links) how to create shortcode for custom taxonomy description value.

    For example if there is woocommerce custom taxonomy LOCAL STORE, There is value like “Wamarts”, and it has description “This local store is very nice”.
    What shortcode would call this description?

    Thank you very much in advance for any help.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Tutorials about creating shortcodes are plentiful, so that part can be covered with some general searching or even just reading the WordPress codex.

    Terme descriptions look like they can be grabbed with term_description()
    https://codex.ww.wp.xz.cn/Function_Reference/term_description

    You’d need to provide the term ID as the first parameter, and the woocommerce taxonomy slug as the 2nd.

    The shortcode could simply echo the function return value. From the looks of it, passing zero terms should have it try to display the description of the current queried term/taxonomy.

Viewing 1 replies (of 1 total)

The topic ‘Custom taxonomy description shortcode’ is closed to new replies.