Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The Template for displaying taxonomies.
- *
- * @package WordPress
- * @subpackage MSK
- * @since MSK 1.1
- */
- include ('header_cata.php'); ?>
- <div id="marque-collecs">
- <?php
- $term = $wp_query->queried_object;
- echo '<h1>'.$term->name.'</h1>';
- echo '<p>'.$term->description.'</p>';
- ?>
- <ul>
- <li><a id="showall" href="#none">Tout</a></li>
- <li><a id="showopti" href="#none">Optique</a></li>
- <li><a id="showsun" href="#none">Solaire</a></li>
- </ul>
- </div>
- <div id="marque-modeles">
- <div class="scroll-pane scrollcata">
- <?php
- $query = new WP_Query(array(
- 'post_type' => 'reference',
- 'taxonomy'=>'marque',
- 'term'=>$term->slug,
- 'orderby' => 'title',
- 'order' => 'ASC'
- ));
- if($query->have_posts()) : while($query->have_posts()) : $query->the_post();
- ?>
- <?php $type = get_post_meta( $post->ID, 'type', true ); ?>
- <?php if ( get_post_meta($post->ID, 'type', true) ) { ?>
- <div class="vignette-cata <?php echo $type ?>">
- <?php } else { ?>
- <div class="vignette-cata">
- <?php } ?>
- <figure>
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('full'); ?></a>
- <figcaption><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></figcaption>
- </figure>
- </div>
- <?php endwhile; endif; wp_reset_postdata(); ?>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- $('#showsun').click(function() {
- $('.optique').hide();
- $('.solaire').fadeIn();
- });
- $('#showopti').click(function() {
- $('.optique').fadeIn();
- $('.solaire').hide();
- });
- $('#showall').click(function() {
- $('.optique').fadeIn();
- $('.solaire').fadeIn();
- });
- });
- </script>
- <div id="msklink">
- <p class="right"><a href="<?php bloginfo('url'); ?>">Site MSK</a></p>
- <p class="left"><a href="<?php bloginfo('url'); ?>/catalogue/">Accueil catalogue</a></p>
- <div class="clearfix"></div>
- </div>
- </div> <!-- fin catalogue -->
- <?php include ('footer_cata.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement