Dynamically adding icons to categories, tags and other taxonomy terms can be achieved by using these plugins:
and
1 2 3 4 5 6 7 8 9 10 11 12 | <?php // get current taxonomy term id on wordpress $term_id = get_queried_object()->term_id; // get the icon for the current term_id (found above) $iconpic = get_term_meta( $term_id , ‘icon’, true ); // show the icon on the page echo ‘<div class =”dashicons ‘ . $iconpic .'”></div>’; ?> |