Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

268
Visualizações
PHP echo not outputting html tags

I'm trying to output content from an Advanced Custom Fields (ACF) in my wordpress theme. At the moment though, all I'm getting is the plain text content from the ACF inside double quotation marks, not inside the div and h1 tags.

The code is copied from another theme I made where it worked, which makes me think something is interfering with it somewhere?

<?php $process_title = the_sub_field('process_title'); ?>

<?php if(!empty($process_title)) : ?>
    <div class="process-title">
        <h1 class="process-heading">
            <?php echo $process_title; ?>
        </h1>
    </div>
<?php endif; ?>
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Thanks to @M.Eriksson, the correct code should be:

<?php $process_title = get_sub_field('process_title'); ?>
<?php if(!empty($process_title)) : ?>
    <div class="process-title">
        <h1 class="process-heading">
            <?php echo $process_title; ?>
        </h1>
    </div>
<?php endif; ?>
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda