2
I’m creating a post type post with Advanced Custom Fields. I would like the text to be displayed on a certain line "Secretariat" when the field the_field('contratante')
was in use... when the_field('setor02')
the word would not be shown.
<?php
while (have_posts()) : the_post();
echo '<h4 class="titulos-widget-internos">'; echo 'Dados do Contrato de Número '; the_title(); echo '</h4>';
echo '<ul>';
echo '<li>Origem: <strong>'; the_field('origem'); echo '</strong></li>';
echo '<li>Contratante: <strong> Secretaria de '; the_field('contratante'); echo '</strong></li>';
echo '<li>Contratada(o): <strong>'; the_field('contratadao'); echo '</strong></li>';
echo '<li>Valor: <strong> R$ '; the_field('valor'); echo '</strong></li>';
echo '<li>Início da vigência: <strong>'; the_field('inicio_da_vigencia'); echo '</strong></li>';
echo '<li>Fim da vigência: <strong>'; the_field('fim_da_vigencia'); echo '</strong></li>';
echo '</ul>';
echo '<p class="objeto">'; echo 'Objeto: '; the_field('objeto'); echo'</p>';
echo '</div>';
echo '<a class="botao-padrao" href="'; the_field('contrato_original'); echo '"';
echo 'target="_blank" role="button">Baixar arquivo</a>';
//mh_after_post_content();
//comments_template();
endwhile; ?>
White, you want the text "Contractor: Secretariat of:..." to disappear when the_field('setor02') has some value other than nothing and that it appears if it exists and if the_field('setor02') does not exist, is that it? or you want to add a new line only with the word secretariat if the conditions I said are met?
– JassRiver