Support

Account

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.