Ciao a tutti,
devo recuperare l’immagine di ogni sottocategoria di una categoria madre…
io l’ho risolto cosà¬
`
<?
// funzione per recuperare le immagini da ogni sottocategoria di partners
?>
<?php
query_posts(‘&posts_per_page=2&cat=19’); ?>
<?
foreach((get_the_category()) as $childcat) {
?>
<?php while (have_posts()) : the_post(); ?>
<?php
get_the_image( array(‘link_to_post’ => false, ‘custom_key’ => array( ‘210×95’ ), ‘default_size’ => ‘210×95’, ‘width’ => ‘210’, ‘height’ => ’95’ ) );
?>
<?php endwhile;
}
?>
`
Devo resettare la query?
C’è una maniera più semplice?
Grazie!