Issue with ACF and custom taxonomy

Description:

I have a custom taxonomy that has some ACF fields (Description and featured image). When I create a template for this taxonomy everything works until there is a post assigned to the taxonomy term.

Step-by-step reproduction instructions:

  1. Create a custom taxonomy
  2. create an ACF for the taxonomy (e.g. image)
  3. create a term and select an image for the term (do not assign any post to this term yet)
  4. create a template for the taxonomy and use the ACF image
  5. preview the page of the taxonomy term you just created. It should work as expected
  6. now assign a post to the term you created
  7. the featured image disappears

Screenshots, screen recording, code snippet

for details see this video:

Environment info

  • WordPress version: latest
  • Gutenberg Plugin version: -
  • Cwicly Plugin version: latest
  • Cwicly Theme version: latest

Hi @Jonas,

Thank you for the detailed steps and video, it helps!

I have been able to reproduce this issue on my end and can confirm it is a bug.​
Please bear with us while we find a fix for this.​

Thank you for reporting this and sorry for the inconvenience.​

Hello @Jonas,

Looking at this a bit more closely, it doesn’t seem as if you set a location for the ACF Field, which will inevitably fall onto a post ID when necessary.

A Taxonomy Terms block would have been necessary as it allows to be used as a location parameter in the dynamic selector.

In 1.2.9.5.7, we have added a new property Current Taxonomy Archive that allows you to achieve the same result without the Taxonomy Terms block.

If you run into any issue, please let me know.

Cheers,

1 Like

Hi @Louis,

thanks a lot! Also this works beautifully now. Thanks for the quick fix! :slight_smile: