Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Resultados
- */
- ?>
- <?php get_header(); ?>
- <div class="container">
- <?php include 'sidebar-left.php'; ?>
- <section class="conteudo">
- <div class="box-resultados">Exebindo 1-10 de 10 resultados</div>
- <?php
- $args = array(
- 'post_type' => 'post',
- 'tax_query' => array(
- 'relation' => 'AND',
- array(
- 'taxonomy' => 'estado',
- 'field' => 'slug',
- 'terms' => $estado,
- 'operator' => 'AND',
- ),
- array(
- 'taxonomy' => 'regiao',
- 'field' => 'slug',
- 'terms' => $regiao,
- 'operator' => 'AND',
- ),
- array(
- 'taxonomy' => 'bairro',
- 'field' => 'slug',
- 'terms' => $bairro,
- 'operator' => 'AND',
- ),
- array(
- 'taxonomy' => 'especialidade',
- 'field' => 'slug',
- 'terms' => $especialidade,
- 'operator' => 'AND',
- ),
- array(
- 'taxonomy' => 'ambiente',
- 'field' => 'slug',
- 'terms' => $ambiente,
- 'operator' => 'AND',
- ),
- array(
- 'taxonomy' => 'delivery',
- 'field' => 'slug',
- 'terms' => $delivery,
- 'operator' => 'AND',
- ),
- ),
- );
- $query = new WP_Query( $args );
- if($query->have_posts()):
- while($query->have_posts()):
- $query->the_post(); ?>
- <article>
- <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( array(184, 184) ); ?></a>
- <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
- <ul>
- <li><img src="<?php bloginfo('stylesheet_directory'); ?>/imagem/icon-map.png" width="22" height="18"><?php the_field( "bairro" ); ?></li>
- <li><img src="<?php bloginfo('stylesheet_directory'); ?>/imagem/icon-tel.jpg"> <?php the_field( "telefone" ); ?></li>
- <li><img src="<?php bloginfo('stylesheet_directory'); ?>/imagem/icon-seta.png"> <a href="<?php the_permalink(); ?>">Saiba mais</a></li>
- </ul>
- </article>
- <?php
- endwhile;
- endif;
- ?>
- </section>
- <?php include 'sidebar-right.php'; ?>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement