Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None | 0 0
  1. <ul class="program__list">
  2. <?php foreach ( $posts_ as $pst ) : ?>
  3.   <?php if ( $pst['post_type'] == 'programa' ) : ?>
  4.     <li class="program__item">
  5.         <a href="<?php echo $pst[ 'link' ]; ?>">
  6.             <figure class="program__image mask">
  7.                 <figcaption class="program__caption">
  8.                     <?php if ( $pst[ 'titulo' ] ) :?>
  9.                         <h2 class="program__title"><?php echo $pst[ 'titulo' ]; ?></h2>
  10.                     <?php endif; ?>
  11.  
  12.                 </figcaption>
  13.                 <img src="<?php echo $pst[ 'img' ]; ?>" alt="<?php echo $pst[ 'titulo' ]; ?>">
  14.             </figure>
  15.         </a>
  16.     </li>
  17.   <?php endif; ?>
  18. <?php endforeach; ?>
  19. </ul>
  20.  
  21.  
  22. <ul class="search-result">
  23. <?php foreach ( $posts_ as $pst ) : ?>
  24.   <?php if ( $pst['post_type'] != 'programa' ) : ?>
  25.     <li class="card">
  26.         <a class="card__link-post" href="<?php echo $pst[ 'link' ]; ?>">
  27.             <div class="card__content">
  28.                 <?php if ( array_key_exists( 'categoria', $pst ) && $pst[ 'categoria' ] ) : ?>
  29.                     <h4 class="card__cat"><?php echo $pst[ 'categoria' ][ 'nome' ]; ?></h4>
  30.                 <?php endif; ?>
  31.                 <?php if ( $pst[ 'titulo' ] ) : ?>
  32.                     <h3 class="card__title"><?php echo $pst[ 'titulo' ]; ?></h3>
  33.                 <?php endif; ?>
  34.                
  35.                 <?php if ( $pst[ 'resumo' ] ) : ?>
  36.                     <p class="card__desc"><?php echo $pst[ 'resumo' ]; ?></p>
  37.                 <?php endif; ?>
  38.             </div>
  39.             <?php if ( $pst[ 'img' ] ) : ?>
  40.                 <figure class="card__figure">
  41.                     <img class="card__thumb" src="<?php echo $pst[ 'img' ]; ?>" alt="#titulo-card">
  42.                 </figure>
  43.             <?php endif; ?>
  44.         </a>
  45.     </li>
  46.   <?php endif; ?>
  47. <?php endforeach; ?>
  48. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement