Home / Admin / Add terms to downloads shortcode
Duplicate Snippet

Embed Snippet on Your Site

Add terms to downloads shortcode

Adds label and comma-separated terms list to [downloads] shortcode based on taxonomy

Code Preview
php
<?php
function sd_edd_downloads_shortcode_display_terms() {
	$post_id = get_the_ID();
    // use "download_category" for categories and "download_tag" for tags
    the_terms( $post_id, 'download_category', '<span class="download-terms-label">Categories:</span> ', ', ', '' );
}
add_action( 'edd_download_after', 'sd_edd_downloads_shortcode_display_terms' );

Comments

Add a Comment