Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/04/2020, 18:45
chaleko
 
Fecha de Ingreso: noviembre-2005
Mensajes: 117
Antigüedad: 18 años, 5 meses
Puntos: 1
Respuesta: Como mostrar los post de una categoria en particular

Dejo el codigo funcional por si alguien mas le sirve:

<div class="" id="" style="width:300px;">

<?php $loop = new wp_Query(array(
'post_type' => 'portafolio_casas',
'orderby' => 'title',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'categorias',
'field' => 'slug',
'terms' => 'sur'
))));
?>

<?php while ($loop->have_posts()): $loop->the_post(); ?>

<!-- Grid column -->
<div>

<?php if ( have_rows( 'galerias' ) ) : ?>
<?php while ( have_rows( 'galerias' ) ) : the_row(); ?>
<?php $foto_01 = get_sub_field( 'foto_01' ); ?>
<?php if ( $foto_01 ) { ?>

<a href="<?php the_permalink() ?>"><img class="img-fluid" src="<?php echo $foto_01['url']; ?>" alt="<?php echo $foto_01['alt']; ?>" /></a>

<?php } ?>
<?php endwhile; ?>
<?php endif; ?>


</div>
<!-- Grid column -->


<?php endwhile;?>
</div>