Commit 48a5d012 authored by Nathan Peraldi's avatar Nathan Peraldi

edit html tags for CSS

parent 363920ed
<?php
//nombre de membres à afficher par ligne
$maxMembersPerLine = 4;
get_header();
?>
<?php get_header(); ?>
<div class="wrap">
<main id="main" class="site-main" role="main">
<ul id="adullact-member-list">
<?php
global $post; //variable wp
$order = "asc";
<div id="adullact-sort-buttons">
<div id="adullact-sort-by-type-buttons">
//on récup le nom de la catégorie de l'url
$category = explode("/", $_SERVER['REQUEST_URI'])[2];
<ul class="adullact-member-list">
<?php
global $post; //variable wp
$order = "asc";
//on récup le tri croissant / décroissant
if (isset($_GET["order"])) {
$order = $_GET["order"];
//on récup le nom de la catégorie de l'url
$category = explode("/", $_SERVER['REQUEST_URI'])[2];
if ($order != "asc" && $order != "desc") {
$order = "asc";
}
}
$args = array('posts_per_page' => 10, 'offset' => 0, 'category_name' => $category, 'orderby' => 'title', 'order' => $order);
$myposts = get_posts($args);
echo "<br>";
//on récup le tri croissant / décroissant
if (isset($_GET["order"])) {
$order = $_GET["order"];
$count = 0; //va servir pour les retour à la ligne lorsqu'on a affiché le max d'éléments par ligne
childrens_of_member_category("$category");
if ($order != "asc" && $order != "desc") {
$order = "asc";
}
}
$args = array('posts_per_page' => 10, 'offset' => 0, 'category_name' => $category, 'orderby' => 'title', 'order' => $order);
$myposts = get_posts($args);
$count = 0; //va servir pour les retour à la ligne lorsqu'on a affiché le max d'éléments par ligne
childrens_of_member_category("$category");
?>
</ul>
</div>
<div id="adullact-sort-by-name">
<ul class="adullact-member-list">
<?php sort_page() ?>
</ul>
</div>
</div>
<?php echo "<div class='adullact-members-list'>";
?>
</ul>
<?php
echo "<div class='adullact-members-list'>";
echo "<div class='adullact-line'>";
foreach ($myposts as $post) : setup_postdata($post);
$id = get_the_id();
$url = get_metadata("post", $id, "project_url")[0];
$count += 1;
?>
<a href="<?php echo $url; ?>" target="_blank" class="adullact-member">
<?php the_post_thumbnail(array("200", "200")); ?> <br>
<?php the_title(); ?> <br>
<?php the_tags($before = ''); ?>
</a>
<?php
if ($count >= $maxMembersPerLine) {
$count = 0;
echo "</div>";
echo "<div class='adullact-line'>";
}
endforeach;
<div class="adullact-member">
<div>
<a href="<?php echo $url; ?>" target="_blank">
<?php the_post_thumbnail(array("200", "200")); ?> <br>
</a>
</div>
<p><?php the_title(); ?></p><br>
</div>
<?php endforeach;
echo "</div></div>";
wp_reset_postdata(); ?>
</main>
</div>
......
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