FWIW, this is admittedly very very hackish, but the way I’ve been handling this until a better solution comes in is to create a custom block (called “Section”) which has an option to set to either open or close. I then put that block before and after (set to “open” and then “close” respectively) the blocks I want to “wrap” in a section container. Then in the block template I simply render either an opening HTML tag or a closing HTML tag. I also add additional (conditional) fields to set background colour/padding and other customizable things.
Same here. Any word if a fix for this is rolling out in the next release? Would be great to not be limited to Dashicons.
Doh, my bad. It works perfectly, I simply had it disabled (as I was intending to use it as a clone group). Thanks again for the excellent plugin and this fantastic new feature.
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.
I’m also looking for some clarity with this. I can get the field to display on all comments (by using the “comments -> all” conditional. However, like ramvi, if I add a content type the field doesn’t display.
Is there any way to control what Post Types the ACF fields display on for comments?
To further clarify, a use-case:
Regular Posts (blog posts) use standard comment fields, however, a Custom Post Type “Review” might need a rating field.
I’m still seeing this error (also on Rackspace Cloud Sites). Was this ever resolved Elliot? Are you still asking people to e-mail you directly?
-EDIT: 24h later-
Tried again today, and it updated without any errors.
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.