Hello,
I need to output the contents of the <H6> ‘data_inizio’ and the <H6> ‘data_fine’ field (data picker) in a different languages (and format) from the native WordPress installation.
<?php if( get_field('data_inizio') ): ?>
<h5><?php the_field('data_inizio'); ?> ➔ <?php the_field('data_fine'); ?></h5>
<h6><?php the_field('data_inizio'); ?> ➔ <?php the_field('data_fine'); ?></h6>
<?php else: ?>
<h5><?php the_field('data_fine'); ?></h5>
<h6><?php the_field('data_fine'); ?><h6>
<?php endif; ?>
Also I would like to change the code to output only the value from the field ‘data_fine’ if ‘data_inizio’ and ‘data_fine’ are identical.
Can you help me?
Thanks,
Fabio
<?php if (get_field('data_inizio') == get_field('data_fine')): ?>
<h5><?php the_field('data_fine'); ?></h5>
<h6><?php the_field('data_fine'); ?><h6>
<?php else: ?>
<h5><?php the_field('data_inizio'); ?> ➔ <?php the_field('data_fine'); ?></h5>
<h6><?php the_field('data_inizio'); ?> ➔ <?php the_field('data_fine'); ?></h6>
<?php endif; ?>
I’ve solved the php question. Can anyone help me with the date picker translation?