Commit ff9a5a38 authored by Nathan Peraldi's avatar Nathan Peraldi

edit: members are recovered with get_pages()

parent ff18bada
......@@ -56,16 +56,17 @@ $max_member_numero = ($page * $maxMembersPerPage);
</div>
</div>
<?php echo "<div class='adullact-members-list'>";
$args = array('posts_per_page' => -1, 'offset' => "0", 'category_name' => $category, 'orderby' => 'title', 'order' => $order);
$myposts = get_posts($args);
$members_page = get_page_by_title("membres");
$args = array('child_of' => $members_page->ID, 'sort_order' => $order);
$mypages = get_pages($args);
$number_of_total_posts = count($myposts); //pour les pages
$number_of_total_posts = count($mypages); //pour les pages
if (($number_of_total_posts == 0) || ($number_of_total_posts < $min_member_numero)) {
echo "<h3>Aucun résultat.</h3>";
$pagination = false;
} else {
$counter = 1;
foreach ($myposts as $post) : setup_postdata($post);
foreach ($mypages as $post) : setup_postdata($post);
if ($counter >= $min_member_numero) {
if ($counter <= $max_member_numero) {
$id = get_the_id();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment