• Hi, I coding my own theme with own widgets. Now, I build Category Widget where I want to add icons for category list. But for every item I need unique icon.

    Some solution for this problem?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You could use or refer the code from WP Term Icons plugin. It is using the Taxonomy Term Meta feature introduced in WordPress 4.4. You can retrieve icon using get_term_meta like this:

    get_term_meta( $term_id, 'icon', true );

    Where $term_id is the numeric ID of the term you want to get the icon for.

    Hope that helps.

    Thread Starter Filip Madunický

    (@yelidric)

    Thanks, I try this solution, right now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Icons to Category Widget’ is closed to new replies.