List download categories with EDD

If you are using EasyDigitalDownloads plugin you may want to build a template which lists all download categories. This function prints an ul-list for each category you’ve set in your EDD downloads.
Add the snippet to your functions and call it in a template file where you desire to list the EDD categories.

/**
 * Snippet Name: List download categories with EDD
 * Snippet URL: https://www.wpcustoms.net/snippets/list-download-categories-edd/
 */
  function wpc_list_edd_categories() {
    $taxonomy = 'download_category'; // EDD's taxonomy for categories
    $terms = get_terms( $taxonomy ); // get the terms from EDD's download_category taxonomy

echo '


Add to bookmarks |
Share on Twitter
|
added:
| help

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x