Advertisement
Guest User

single.php

a guest
Aug 16th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.29 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div class="non-home-parallax product-listing-parallax" style="
  3. <?php if( has_term ('fama-advance', 'product-cat') ) { ?>
  4.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/advance.jpg');
  5. <?php }
  6. elseif ( has_term ('fama-confectionary-solutions', 'product-cat') ) { ?>
  7.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/premium.jpg');
  8. <?php }
  9. elseif ( has_term ('fama-premium', 'product-cat') ) { ?>
  10.  background-image:url('<?php echo get_template_directory_uri(); ?>/img/parallax/confectionary.jpg');
  11. <?php }
  12. else { ?> <?php } ?> ">
  13.     <!--Breadcrumbs-->
  14.     <div class="breadcrumbs">
  15.         <div class="container-12">
  16.             <div class="col-12">
  17.                 <nav class="bread"> <a href="#">ΠΡΟΪΟΝΤΑ</a>
  18.                     <a href="#">Fama Premium</a>
  19.                     <a href="#">Φοινικελαια</a>
  20.                     <a href="#">ΦΟΙΝΙΚΕΛΑΙΟ FAMA ΡΑΦΙΝΕ</a>
  21.                 </nav>
  22.             </div>
  23.         </div>
  24.         <div class="clear"></div>
  25.     </div>
  26.     <!--End of Breadcrumbs-->
  27.     <div class="wrapper">
  28.         <section class="container-12">
  29.         <!--PRODUCT VIEW -->
  30.             <div class="col-3 single-product-img">
  31.                 <img src="<?php the_field('single_product_thumb'); ?>">
  32.             </div>
  33.             <article class="col-5 product-desc">
  34.                 <h3><?php echo get_the_title(); ?></h3>
  35.                 <h5><?php the_field('procuct_code') ?></h5>
  36.                 <h6>ΠΕΡΙΓΡΑΦΗ</h6>
  37.                 <p><?php the_field('single_product_desc'); ?></p>
  38.                 <h6>ΣΥΣΚΕΥΑΣΙΑ</h6>
  39.                 <p><?php the_field('single_product_package'); ?></p>
  40.                 <h6>ΑΠΟΘΗΚΕΥΣΗ</h6>
  41.                 <p><?php the_field('single_product_storage'); ?></p>
  42.                 <h6>ΕΦΑΡΜΟΓΕΣ</h6>
  43.                 <p><?php
  44.                     $posttags = get_the_terms(get_the_ID(), 'app');
  45.                     if ($posttags) {
  46.                         $i = 0;
  47.                       foreach($posttags as $tag) {
  48.                         if ($i > 0) echo ', ';
  49.                         echo $tag->name;
  50.                         $i++;
  51.                       }
  52.                     }
  53.                 ?>
  54.                 </p>
  55.                 <a class="orange_button" href="/?s=<?php echo str_replace(' ', '+', get_the_title()); ?>&post_type=recipes_post_types">συνταγεσ με την χρηση του προϊοντος</a>
  56.             </article>
  57.             <!-- END OF PRODUCT VIEW -->
  58.             <div class="feat-products col-4 no-margin-wleft">
  59.             <h6>ΠροτεινΟμενα ΠροϊΟντα</h6>
  60.                 <?php $related_pr_rec = get_field('related_feat_products');
  61.  
  62.                   if ($related_pr_rec): ?>
  63.                   <?php foreach($related_pr_rec as $post_object): ?>
  64.                   <div class="col-2 no-margin-left-wbottom">
  65.                      <span class="hint--left" data-hint="<?php echo get_the_title($post_object->ID); ?>"><a href="<?php echo get_permalink($post_object->ID) ?>"><img src="<?php the_field('single_product_thumb', $post_object->ID); ?>" alt=""></a></span>
  66.                   </div>
  67.                   <?php endforeach; ?>
  68.                 <?php endif; ?>
  69.             </div>
  70.         </section>
  71.         <div class="clear"></div>
  72.         <div class="push"></div>
  73.     </div>
  74. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement