Home Forums General Issues Comment Fields not showing if Location Rules include Post Template


Comment Fields not showing if Location Rules include Post Template

  • I have a set of comment fields created. They will show inside the comment form if I have the following rule:

    – Comment is equal to Post

    But if I add a 2nd rule, which is an absolute necessity, the comment fields will not show:

    – Comment is equal to Post
    – Post Template is equal to Template Name

    Can anyone see a problem with my rules, or is there a bug here?

    Thanks for your time and energy.

  • 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

  • Hello,

    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)

The topic ‘Comment Fields not showing if Location Rules include Post Template’ is closed to new replies.