Support

Account

Home Forums Front-end Issues Replace featured image with taxonomy image Reply To: Replace featured image with taxonomy image

  • You have 2 choices

    1) When the post is saved, using an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/. Get the tax/term that the new post is saved to, get the image set for that tax/term, update the post thumbnail. I’m not going into much detail here because I would not do this. The main reason is that the image could change at any time and this will not retroactively update old posts if the image for the tax/term changes.

    2) Modify the templates where the featured image is shown and instead of showing this get and display the image for the term. This is what I would do. This can also be modified if you want to allow a different featured image as well as a default. Get the post thumbnail, if there is one then show it, if not then get the term image and show that.