Home › Forums › General Issues › Checkbox Field, Commas, Shortcode for get_field? › Reply To: Checkbox Field, Commas, Shortcode for get_field?
Thank you so much djcottrell! I’ve put your code at the bottom of the functions.php file of my theme and added the shortcode snippet to the Simple Custom Content field.
Two issues:
1. At first, I got an error when I tried to save the revised functions.php file: “syntax error, unexpected T_PUBLIC” – associated with the second line of your code. After a quick search online, it seemed like a good first step to remove the “public ” from that line. After doing that, I was able to save the revised functions.php file.
2. I then added the shortcode snippet to the Simple Custom Content field. But on the front-end of the site, instead of seeing the values from the checkbox field separated by commas, I now see the word “Array”.
Any thoughts?
Thanks again – I can’t tell you how much I appreciate your willingness to help me!
Frank
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.