Advertisement
Guest User

taxonomy.php

a guest
Aug 16th, 2014
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.01 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div class="non-home-parallax product-listing-parallax" style="
  3. <?php if( is_tax ('product-cat', 'fama-advance') ) { ?>
  4.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/advance.jpg');
  5. <?php }
  6. elseif ( is_tax ('product-cat', 'fama-premium') ) { ?>
  7.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/premium.jpg');
  8. <?php }
  9. elseif ( is_tax ('product-cat', 'fama-confectionary-solutions') ) { ?>
  10.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/confectionary.jpg');
  11. <?php }
  12. elseif ( is_tax ('product-cat', 'fama-powder-solutions') ) { ?>
  13.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/powder.jpg');
  14. <?php }
  15. elseif ( is_tax ('product-cat', 'fama-improvers') ) { ?>
  16.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/improvers.jpg');
  17. <?php }
  18. elseif ( is_tax ('product-cat', 'fama-chocoday-creams') ) { ?>
  19.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/chocodaycreams.jpg');
  20. <?php }
  21. elseif ( is_tax ('product-cat', 'fama-choco-day') ) { ?>
  22.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/chocoday.jpg');
  23. <?php }
  24. elseif ( is_tax ('product-cat', 'fama-deliciozo') ) { ?>
  25.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/deliciozo.jpg');
  26. <?php }
  27. elseif ( is_tax ('product-cat', 'fama-frutopia') ) { ?>
  28.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/frutopia.jpg');
  29. <?php }
  30. elseif ( is_tax ('product-cat', 'fama-fruigel') ) { ?>
  31.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/fruigel.jpg');
  32. <?php }
  33. elseif ( is_tax ('product-cat', 'fama-creams') ) { ?>
  34.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/creams.jpg');
  35. <?php }  
  36. elseif ( is_tax ('product-cat', 'fama-ice') ) { ?>
  37.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/ice.jpg');
  38. <?php }  
  39. else { ?> <?php } ?> ">
  40.         <div class="container-12">
  41.             <div class="col-12">
  42.                     <h4 style="
  43.                     <?php if( is_tax ('product-cat', 'fama-advance') ) { ?>
  44.                      background-color: #ff9900;
  45.                     <?php }
  46.                     elseif ( is_tax ('product-cat', 'fama-premium') ) { ?>
  47.                     background-color: #004A93;
  48.                     <?php }
  49.                     elseif ( is_tax ('product-cat', 'fama-confectionary-solutions') ) { ?>
  50.                     background-color: #E7C388;                    
  51.                     <?php }
  52.                     elseif ( is_tax ('product-cat', 'fama-powder-solutions') ) { ?>
  53.                     background-color: #FFED3D;                    
  54.                     <?php }
  55.                     elseif ( is_tax ('product-cat', 'fama-improvers') ) { ?>
  56.                     background-color: #FDBA2F;                    
  57.                     <?php }
  58.                     elseif ( is_tax ('product-cat', 'fama-chocoday-creams') ) { ?>
  59.                     background-color: #693A18;                    
  60.                     <?php }
  61.                     elseif ( is_tax ('product-cat', 'fama-choco-day') ) { ?>
  62.                     background-color: #3B210D;                    
  63.                     <?php }
  64.                     elseif ( is_tax ('product-cat', 'fama-deliciozo') ) { ?>
  65.                     background-color: #DB0070;                    
  66.                     <?php }
  67.                     elseif ( is_tax ('product-cat', 'fama-frutopia') ) { ?>
  68.                     background-color: #98005D;                    
  69.                     <?php }
  70.                     elseif ( is_tax ('product-cat', 'fama-fruigel') ) { ?>
  71.                     background-color: #BB001C;                    
  72.                     <?php }
  73.                     elseif ( is_tax ('product-cat', 'fama-creams') ) { ?>
  74.                     background-color: #96C031;                    
  75.                     <?php }  
  76.                     elseif ( is_tax ('product-cat', 'fama-ice') ) { ?>
  77.                     background-color: #9FDAF1;                    
  78.                     <?php }  
  79.                     else { ?> <?php } ?> ">
  80.                     <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?></h4>
  81.                                  
  82.             </div>
  83.         </div>
  84.         <div class="clear"></div>
  85.     </div>
  86.     <!--Breadcrumbs-->
  87.     <div class="breadcrumbs">
  88.         <div class="container-12">
  89.             <div class="col-12">
  90.                 <nav class="bread"> <a href="#">ΠΡΟΪΟΝΤΑ</a>
  91.                     <a href="#">Fama Premium</a>
  92.                     <a href="#">Φοινικελαια</a>
  93.                 </nav>
  94.             </div>
  95.         </div>
  96.         <div class="clear"></div>
  97.     </div>
  98.     <!--End of Breadcrumbs-->
  99.     <div class="wrapper">
  100.         <section class="container-12">
  101.             <!-- Product Row -->
  102.                  <?php $i = 0; ?>
  103.                 <?php while ( have_posts() ) : the_post();
  104.                     if ($i % 4  == 0):?>
  105.                     <div class="products-all">
  106.                 <?php endif; ?>
  107.                 <div class="col-3 product-view">
  108.                     <a href="<?php echo get_permalink(); ?>"><img src="<?php the_field('single_product_thumb'); ?>" class="product-img"></a>
  109.                     <h5><a href="<?php echo get_permalink(); ?>"><?php echo get_the_title(); ?></a>
  110.                     </h5>
  111.                 </div>
  112.                 <?php if ($i % 4  == 3):?>
  113.                     <div class="clear"></div>
  114.                     </div>
  115.                 <?php endif; ?>
  116.                 <?php $i++; ?>
  117.             <?php endwhile; ?>
  118.             <?php if ($i % 4 != 0):?>
  119.              <div class="clear"></div>
  120.          <?php endif; ?>
  121.             </section>
  122.         <div class="clear"></div>
  123.         <div class="push"></div>
  124.     </div>
  125.  
  126. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement