Orden por e incluye matriz por identificaciones de publicaciones específicas
-
30-10-2019 - |
Pregunta
Tengo lo siguiente:
<?php $num_cols = 2; // set the number of columns here
$args = array(
'post_type' => 'testimonials',
'posts_per_page' => 4,
'orderby' => 'ID',
'include' => '883, 563, 568, 106',
'order' => ''
);
query_posts($args);
if (have_posts()) :
for ( $i=1 ; $i <= $num_cols; $i++ ) :
echo '<div id="col-'.$i.'" class="col">';
$counter = $num_cols + 1 - $i;
while (have_posts()) : the_post();
if( $counter%$num_cols == 0 ) : ?>
<div id="box">
<?php the_post_thumbnail('post-thumbnail', array('title' => '', 'alt' => '')); ?>
<?php the_excerpt();?>
</div>
<?php endif; $counter++;
endwhile;
echo '</div>';
endfor;
endif;
wp_reset_query();
?>
Pensé que simplemente colocando las identificaciones de publicaciones, podría tener las publicaciones específicas, y solo esas publicaciones. Desafortunadamente, ese no parece ser el caso. Así que me preguntaba si alguien sabía cómo puedo lograr esto.
¡Gracias por adelantado!
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a wordpress.stackexchange