Home › Forums › Feature Requests › Checkbox > Colors › Reply To: Checkbox > Colors
in the post.php;
<h2>Available Colors</h2>
<p><?php the_field(‘colors’); ?></p>
I have tried:
1. in the default value box in the edit Custom Fields
<div style=”color: <?php the_field(‘color’); ?>”>
<p>I will take on the color chosen!</p>
</div>
2. in the meta_box_options.php
<?php
do_action(‘acf/create_field’, array(
‘type’ => ‘checkbox’,
‘name’ => ‘white[hide_on_screen]’,
‘value’ => $white[‘hide_on_screen’],
‘choices’ => array(
‘the_content’ => __(“<?php ?>”,’acf’),
‘excerpt’ => __(“Excerpt”),
‘custom_fields’ => __(“Custom Fields”),
… )
));
?>
Nothing works, I don’t know where to put the code.
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.