Guest User

Untitled

a guest
May 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <?php
  2.     $amor = new WP_Query(array(
  3.         'post_type' => 'testes',
  4.         'tax_query' => array(
  5.             array(
  6.                 'taxonomy' => 'categorias_testes',
  7.                 'field' => 'slug',
  8.                 'terms' => 'amor'
  9.             )
  10.         )
  11.     ));
  12.     $amizade = new WP_Query(array(
  13.         'post_type' => 'testes',
  14.         'tax_query' => array(
  15.             array(
  16.                 'taxonomy' => 'categorias_testes',
  17.                 'field' => 'slug',
  18.                 'terms' => 'amizade'
  19.             )
  20.         )
  21.     ));
  22. ?>
  23.     AMOR
  24.     <?php if ($amor->have_posts()) : while($amor->have_posts()) : $amor->the_post(); ?>
  25.         <?php the_post_thumbnail('thumbnail'); ?>
  26.         <a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>    
  27.     <?php endwhile; else :  ?>
  28.         404
  29.     <?php endif;  ?>
  30.    
  31.     AMIZADE
  32.     <?php if ($amizade->have_posts()) : while($amizade->have_posts()) : $amizade->the_post(); ?>
  33.             <?php the_post_thumbnail('thumbnail'); ?>
  34.         <a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>    
  35.     <?php endwhile; else :  ?>
  36.         404
  37.     <?php endif;  ?>
Add Comment
Please, Sign In to add comment