Home › Forums › ACF PRO › ACF on Custom Post's comments › Reply To: ACF on Custom Post's comments
James, you’re a rock star. That worked near perfectly. The only problem was that the $options['comment']
didn’t really contain any useful information — it only returns a string related to the state of the comment form (I only tested it on a new comment and it said “new”).
But that wasn’t hard to work around by getting $post
as a global and grabbing the $post->post_type
value for comparing.
For anyone else looking to do this, here’s the complete code that I used and appears to be working. You’ll just need to stick that in your functions.php
.
James, thanks again.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.