My website is built on custom post types, that I have organized with different custom taxonomies. The menu buttons are the taxonomies archive pages (red, blue, green), so that when you click on the term 'red' of the custom taxonomy 'socks' (for example) you get all the articles that correspond to red socks. Now then, the problem is I only have one page (called taxonomy-socks.php) that deals with the custom taxonomy term archive page and I would like to set a little presentation of the red socks, the blue socks, the green socks with pictures and css style... on each archive page, but I have no idea how to acheive this ! The best choice I guess would be to make the description in an article and then display each article on each custom taxonomy term archive page... But how ? This is the code of my page taxonomy-socks.php :
<div class="main-content">
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
<div id="container">
<div id="content" role="main">
<h1><?php echo $term->name; ?></h1>
<?php
if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
$i++;?>
<div class="portfolio<?php if ( ($i%3) == 0 ) { echo ' last'; } elseif ( ($i%2) == 0 ) { echo ' two-last'; } elseif ( ($i%4) == 0 ) { echo ' very-large'; } ?>" data-thematique="<?php echo implode(', ', get_field('thematique')); ?>" data-activite="<?php echo implode(', ', get_field('activite')); ?>" data-niveau="<?php echo implode(', ', get_field('niveau')); ?>">
<div class="project-image"><?php the_post_thumbnail(); ?></div>
<div class="project-info">
<span class="portfolio-title"><?php the_title(); ?></span>
<span class="portfolio-act"><span class="light">NIVEAU :</span> <span class="white"><?php the_field('niveau'); ?></span></span>
<span class="portfolio-act"><span class="light">THÉMATIQUE :</span> <span class="white"><?php the_field('thematique'); ?></span></span>
<span class="portfolio-act"><span class="light">ACTIVITÉ :</span> <span class="white"><?php the_field('activite'); ?></span></span>
<span class="portfolio-act"><span class="light">Lieu : </span><span class="white"><?php echo the_field('lieu1'); ?></span></span></div><a href="<?php echo get_permalink(); ?>" class="button portfolio-button">EN SAVOIR PLUS</a>
</div>
<?php
endwhile; ?>
<?php endif; ?></div>
</div></div>
Thanks for your help... I hope it's clear enough..