If you’re using Easy Digital Downloads, you sometimes want to style downloads differently, depending on the category that the download has been assigned to.

Provided below are 2 code snippets, one for downloads that appear when using EDD’s built in [[downloads]] shortcode, and one for a custom loop using WordPress’ post_class filter.

Paste the one you need into your child theme’s functions.php, or a custom plugin you have built.

Use this one when using EDD’s [[downloads]] shortcode

Use this one when using a custom loop which uses WordPress’ post_class filter