Support

Account

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

Solved

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 https://www.advancedcustomfields.com/resources/custom-location-rules/

    • Awena

    • May 15, 2019 at 7:28 pm

    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)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.