Dynamic image for archive template

Hi,

I have an archive page which shows groups. They have a post category of group and a tag which relates to the type of group, e.g. health & fitness, social, children etc. This page allows groups can be filtered by tag to show only groups with that tag. I want my header image for this article page to dynamically change depending on the tag which is selected. I think I need to set up 5 images, one for each tag, and have conditional logic for each one to say ‘if current tag is health& fitness, show this header image’ and so on for each tag/image. But how do I actually do this?

Hello @sarammog,

Thanks for writing in! You can use ACF Pro plugin and add a custom field to your Tag taxonomy. Perhaps this can help:

You will then have to edit the custom layout and insert the ACF dynamic content to display the image.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.