Skip to content

Instantly share code, notes, and snippets.

@lincolnlemos
Last active October 11, 2017 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lincolnlemos/dbd7c4c6dd9994f9c472fd13f70c1b6e to your computer and use it in GitHub Desktop.
Save lincolnlemos/dbd7c4c6dd9994f9c472fd13f70c1b6e to your computer and use it in GitHub Desktop.
<?php
$depoimentos = get_field( 'depoimentos' );
if ($depoimentos) {
echo '<div id="depoimentos-wrapper" class="">',
foreach ($depoimentos as $depoimento) { extract($depoimento);
$imgsrc = $imagem ? $imagem['src'] : '';
echo '<div class="depoimento-item d-flex">',
($imgSrc ? '<div class="image-box"><img src="'.$imgSrc.'" class="img-fluid"></div>' : ''),
'<div>',
($titulo ? '<h2>'.$titulo.'</h2>' : ''),
($subtitulo ? '<p class="small font-italic">'.$subtitulo.'</p>' : ''),
($conteudo ? '<p>'.$conteudo.'</p>' : ''),
'</div>',
'</div>';
}
echo '</div>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment