Problem: I would like to display the description field from my taxonomy next to the taxonomy input in a Form.
Solution: The wpv-taxonomy-archive shortcode can be used in a taxonomy archive, but a custom shortcode is required to display a taxonomy description outside of a taxonomy archive. Example:
// Get the description of any taxonomy, for use anywhere
// ex: [tssupp-get-tax-desc taxonomy="your-tax-slug"][/tssupp-get-tax-desc]
// https://toolset.com/forums/topic/front-end-form-taxonomy-descriptions/
add_shortcode( 'tssupp-get-tax-desc', 'tssupp_get_tax_desc');
function tssupp_get_tax_desc($atts)
{
$atts = shortcode_atts( array(
'taxonomy' => ''
), $atts );
$taxes = get_option('wpcf-custom-taxonomies');
$description = isset($taxes[$atts['taxonomy']]['description']) ? $taxes[$atts['taxonomy']]['description'] : '';
return $description;
}
Problem:
Assign a template to the products pages of a specific category
Solution:
You can use the view/block filter hook "wpv_filter_force_template" to assign content template dynamically for single product posts based on the taxonomy term or product category.