This get_posts function displays all the articles of the categories except one.
numberposts => -1
is specified to retrieve all the articles in a category.
why am I not showing them all?
Thx!
<?php $related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => -1, 'post__not_in' => array($post->ID) ) );
if( $related ) foreach( $related as $post )
{ setup_postdata($post); ?>
<div class="article">
<a class="article_link" href="<?php the_permalink(); ?>" title="En savoir plus"><?php the_title(); ?></a>
</div>
<?php
} wp_reset_postdata(); ?>