hello,
the plugin advanced custom fields gives you the option to create checkbox custom fields.
you can echo them for example with
<?php
$field = get_field_object('custom-field-name');
$value = $field['value'];
$choices = $field['choices'];
if( $value ): ?>
<ul>
<?php foreach( $value as $v ): ?>
<li>
<?php echo $choices[ $v ]; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
if i take this checkbox customfield for the meta descript with %%cf_custom-field-name%% it only echos "Array" into the meta description.
Could you create a solution that the checked checkboxes are echoed with comma seperation ?
hello,
the plugin advanced custom fields gives you the option to create checkbox custom fields.
you can echo them for example with
if i take this checkbox customfield for the meta descript with %%cf_custom-field-name%% it only echos "Array" into the meta description.
Could you create a solution that the checked checkboxes are echoed with comma seperation ?