The fields are on comments, comments do not have templates. I’m afraid that this will be impossible using the built in location rules. It may be possible by building a custom location rule. You’d need to look at the post that the comment is associated with. I’m not sure how you’d do that, but the documentation for building custom location rules is here https://www.advancedcustomfields.com/resources/custom-location-rules/
I don’t know if this is related, but I just discovered today that I can’t link ACF fields anymore based on template. It’s an older version of ACF (so no change should have happened ?), and I used ACF quite a lot of time and it worked perfectly fine sticking it to a Page template before.
But now my “Page template is equal to TemplateName” rule doesn’t seem to work anymore. I had to set it to “Page is equal to PageName”, which is not very practical if I have hundreds of pages to set.
I reupdated the page with the correct template, reupdated the custom field with the rule, nothing changed.
Do you have any idea why that could be ?
Site is on WP 5.0.1 and ACF 5.7.8
Thanks in advance !
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users