Could someone tell me how i could make this work? i have a loop, and i would like to create another loop to find the other posts from the same category : but this does not work :
<?php while ( have_posts() ) : the_post(); ?> <?php /* How to display all other posts. */ ?> <?php $monid = the_ID(); $cat = get_the_category($monid); //this works $args = array( 'numberposts' => 5, 'offset'=> 1, 'category' => $cat ); $myposts = get_posts( $args ); var_dump($myposts); //this don't ?> <ul> </ul>
i found this topic Loop inside the loop but it does not really work for me : any help?
thanks a lot