-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

2 Answers 2

2

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

Then add image field instant of title.

0
2

You have added the image field to the taxonomy. In your view you are displaying the content either using a view mode or a fields. If you are using fields then add the field to the view itself. If you are using view modes then you will go to your taxonomy vocabulary and click Manage Display. Then drag the image to up into the manage display.

To know what view mode you are using on the view you can click on settings under Content.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.