1

I have a sample site running Drupal 8.1.x, I want to add icons to the taxonomy term.

Example.

I have a term called Animals with the following list in it

Cats Dogs Fish

i want to assign an icon for each terms, a picture of a cat for Cats and so on and will be using it as exposed filter. So i want the pictures/icons instead of the the words Cats - Dogs - Fish.

I have looked into template_preprocess_field(&$variables, $hook). I dont know how to go about it, also tried assigning an image filed for each term but the pictures are not showing up on the exposed filter menu.

Please help.

adding image to term

Better expose filter

The Menu

0

You can add image field in taxonomy.You can find option like this.enter image description here

Then add image field instant of title.

| improve this answer | |
  • yes i did that.... but the pictures not showing up -- could it be because i'm using better exposed filter module ??? – The Naga Tanker Nov 19 '16 at 7:18
  • Try form alter . – Pankaj Yogi Nov 19 '16 at 9:20
  • would be nice if you can show me an example... – The Naga Tanker Nov 19 '16 at 10:23
  • @The Naga Tanker Hi, did you find a solution? I'm trying to solve the same problem now. – makbuk Mar 9 '17 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.