Advertisement
Guest User

Untitled

a guest
Feb 20th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Template for displaying taxonomies.
  4. *
  5. * @package WordPress
  6. * @subpackage MSK
  7. * @since MSK 1.1
  8. */
  9. include ('header_cata.php'); ?>
  10.  
  11. <div id="marque-collecs">
  12. <?php
  13. $term = $wp_query->queried_object;
  14. echo '<h1>'.$term->name.'</h1>';
  15. echo '<p>'.$term->description.'</p>';
  16. ?>
  17.  
  18. <ul>
  19. <li><a id="showall" href="#none">Tout</a></li>
  20. <li><a id="showopti" href="#none">Optique</a></li>
  21. <li><a id="showsun" href="#none">Solaire</a></li>
  22. </ul>
  23.  
  24. </div>
  25.  
  26.  
  27.  
  28. <div id="marque-modeles">
  29.  
  30. <div class="scroll-pane scrollcata">
  31.  
  32.  
  33. <?php
  34. $query = new WP_Query(array(
  35. 'post_type' => 'reference',
  36. 'taxonomy'=>'marque',
  37. 'term'=>$term->slug,
  38. 'orderby' => 'title',
  39. 'order' => 'ASC'
  40. ));
  41.  
  42. if($query->have_posts()) : while($query->have_posts()) : $query->the_post();
  43. ?>
  44.  
  45. <?php $type = get_post_meta( $post->ID, 'type', true ); ?>
  46. <?php if ( get_post_meta($post->ID, 'type', true) ) { ?>
  47. <div class="vignette-cata <?php echo $type ?>">
  48. <?php } else { ?>
  49. <div class="vignette-cata">
  50. <?php } ?>
  51. <figure>
  52. <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('full'); ?></a>
  53. <figcaption><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></figcaption>
  54. </figure>
  55. </div>
  56.  
  57.  
  58. <?php endwhile; endif; wp_reset_postdata(); ?>
  59.  
  60.  
  61.  
  62. </div>
  63.  
  64.  
  65.  
  66. </div>
  67.  
  68. <script>
  69. $(document).ready(function() {
  70. $('#showsun').click(function() {
  71. $('.optique').hide();
  72. $('.solaire').fadeIn();
  73. });
  74.  
  75. $('#showopti').click(function() {
  76. $('.optique').fadeIn();
  77. $('.solaire').hide();
  78. });
  79.  
  80. $('#showall').click(function() {
  81. $('.optique').fadeIn();
  82. $('.solaire').fadeIn();
  83. });
  84. });
  85. </script>
  86.  
  87. <div id="msklink">
  88. <p class="right"><a href="<?php bloginfo('url'); ?>">Site MSK</a></p>
  89. <p class="left"><a href="<?php bloginfo('url'); ?>/catalogue/">Accueil catalogue</a></p>
  90.  
  91. <div class="clearfix"></div>
  92. </div>
  93.  
  94.  
  95.  
  96. </div> <!-- fin catalogue -->
  97.  
  98. <?php include ('footer_cata.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement