getting carousel images from featured products, changed overlay text from slug to...
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 30 Jun 2016 17:10:44 +0000 (13:10 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 30 Jun 2016 17:10:44 +0000 (13:10 -0400)
css/app.css
front-page.php
scss/_main.scss
sidebar.php

index e74ab6b..0acc8de 100644 (file)
@@ -6531,10 +6531,10 @@ header.main {
       display: block;
       color: #FFFFFF;
       font-size: 1.25rem;
-      content: attr(data-content);
+      content: attr(data-title);
       z-index: 3;
       top: 40%;
-      left: 15%;
+      left: 8%;
       text-align: center; }
     #rotation ul li a:hover:after {
       position: absolute;
index 9dfd0d1..ad19c87 100644 (file)
                             <ul id="carousel_ul" >
                                 
                             <?php
+     
+                                $meta_query   = WC()->query->get_meta_query();
+                                $meta_query[] = array(
+                                    'key'   => '_featured',
+                                    'value' => 'yes'
+                                );
+                                $args = array(
+                                    'post_type'   =>  'product',
+                                    'stock'       =>  1,
+                                    'showposts'   =>  6,
+                                    'orderby'     =>  'date',
+                                    'order'       =>  'DESC',
+                                    'meta_query'  =>  $meta_query
+                                );
                                 
-                            $args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'product_tag' => 'frontpage-featured' );
                             $loop = new WP_Query( $args );
+                            
                             while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
                                 <?php 
-                                
+//            
                                 if (has_post_thumbnail( $loop->post->ID )) { 
                                     $url = get_post_thumbnail_id($loop->post->ID);
                                     $thumbnail = wp_get_attachment_image_src( $url, 'full', false);
                                          (string)$thumbnail = $thumbnail[0];
                                      }
                                     $product_url = get_permalink($loop->post->ID);
+                                    $title = $loop->post->post_title;
+                                    echo $title;
+           
                                  ?> 
                                     
                                     <li class="tour-slides" id="tour-slide-<?php echo $loop->post->ID; ?>" style="background: url('<?php echo $thumbnail; ?>') no-repeat center center; background-size: cover;">
-                                        <a class='tour-link' href="<?php echo $product_url; ?>"></a>
+                                        <a class='tour-link' href="<?php echo $product_url; ?>"  data-title="<?php echo $title; ?>"></a>
                                     </li>
                                  <?php
                                 } else { ?> 
index ab0b532..2d40df4 100644 (file)
                     display: block;
                     color: $white;
                     font-size: rem-calc(20);
-                    content: attr(data-content);
+                    content: attr(data-title);
                     z-index: 3;
                     top: 40%;
-                    left: 15%;
+                    left: 8%;
                     text-align: center;
                 }
                 &:after {
index f20d5af..629c221 100644 (file)
@@ -44,6 +44,7 @@ $all_categories = get_categories( $args );
         <?php wp_list_categories( 'taxonomy=product_tag&pad_counts=1&title_li=' ); ?>
     </ul>    
 </div>
+<!--
 <div id="categories_sidebar_container">
     <h5><?php _e( 'Regions of France', 'woothemes' ) ?></h5>
     <ul id="regions_sidebar">
@@ -54,3 +55,4 @@ $all_categories = get_categories( $args );
         ?>
     </ul>
 </div>
+-->