Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php while (have_posts()) : the_post(); ?>
- <div class="product-media">
- <!-- =================================== Product Viewer -->
- <div class="cycle-slideshow product-media-viewer" data-cycle-fx="fade" data-cycle-timeout="0" data-cycle-pager="#no-template-pager" data-cycle-pager-template="">
- <?php $images = get_field('product_images'); ?>
- <!-- Product Viewer // Medium images-->
- <?php
- if ($images) {
- foreach ($images as $image) {
- $medium = $image['sizes']['medium'];
- $id = $image['id'];
- echo '<img src="' . $medium . '" data-large="' . $large . '" data-id="' . $id . '" />';
- }
- } else {
- if (has_post_thumbnail()) {
- echo get_the_post_thumbnail($post_id, 'medium');
- }
- }
- ?>
- </div>
- <!-- Product Viewer // Thumbnails -->
- <?php
- if ($images) {
- echo '<div id=no-template-pager class="cycle-pager external">';
- foreach ($images as $image) {
- $small = $image['sizes']['thumbnail'];
- $id = $image['id'];
- echo '<img src="' . $small . '" data-id="' . $id . '" />';
- }
- echo '</div>';
- }
- ?>
- </div>
- <!-- =================================== Product Viewer // Zoom Images -->
- <div class="product-zoom-viewer">
- <div class="pz-inner">
- <span class="product-zoom-close">Close</span>
- <div class="pz-slider">
- <?php
- if ($images) {
- foreach ($images as $image) {
- $large = $image['sizes']['large'];
- $id = $image['id'];
- echo '<img src="' . $large . '" data-id="' . $id . '" />';
- }
- } else {
- }
- ?>
- </div>
- <a class="pz-pag pz-pag-prev" href=# id="zoom-prev">Previous</a>
- <a class="pz-pag pz-pag-next" href=# id="zoom-next">Next</a>
- </div>
- </div>
- <!-- =================================== Product Info -->
- <aside class="product-info">
- <div class="product-info-inner">
- <?php
- if(get_field('company')) {
- echo '<span class="made-by">' . get_field('company') . '</span>';
- }
- ?>
- <h3 class="pv-product-name">
- <?php
- mp_product_title($product_id, true, false, false, '', '', '');
- // if (mp_product_price(false) != null || mp_product_price(false) != undefined || mp_product_price(false) != '') {
- echo ' - ';
- // }
- mp_product_price(true, $post->ID, false);
- ?>
- </h3>
- <div class="product-description">
- <?php the_content(); ?>
- </div>
- <div class="product-actions">
- <?php mp_product_meta(true, 'single'); ?>
- </div>
- <div class="product-social">
- <!-- AddThis Button BEGIN -->
- <div class="addthis_toolbox addthis_default_style">
- <a class="addthis_button_tweet"></a>
- <a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal" pi:pinit:url="http://www.addthis.com/features/pinterest" pi:pinit:media="http://www.addthis.com/cms-content/images/features/pinterest-lg.png"></a>
- <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
- </div>
- <script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5127b14929060fb5"></script>
- <!-- AddThis Button END -->
- </div>
- </div>
- </aside>
- <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement