more WooCommerce setup
authorIan Weller <ian@gaslightmedia.com>
Thu, 18 Feb 2016 20:40:43 +0000 (15:40 -0500)
committerIan Weller <ian@gaslightmedia.com>
Thu, 18 Feb 2016 20:40:43 +0000 (15:40 -0500)
assets/shopping-cart.png [new file with mode: 0644]
front-page.php
functions.php
header.php
single.php
woocommerce/content-product_cat.php

diff --git a/assets/shopping-cart.png b/assets/shopping-cart.png
new file mode 100644 (file)
index 0000000..d81bdce
Binary files /dev/null and b/assets/shopping-cart.png differ
index 6347637..97753ce 100644 (file)
@@ -1,7 +1,6 @@
 <?php get_header(); ?>
 <main class="page-front">
     <div id="content-wrapper">
-        
         <div class="row medium-uncollapse large-collapse">
             <div class="large-3 columns show-for-large-up">
                 <?php get_sidebar(); ?>
index 17b29f1..4f63d4d 100644 (file)
@@ -97,9 +97,16 @@ function glm_get_header() {
 
 function get_product_category_by_id($cat_id) 
 {
-    $category = get_term_by('id', $cat_id, 'product_cat', 'OBJECT');
-    return $category; 
+$category = get_term_by('id', $cat_id, 'product_cat', 'OBJECT');
+return $category; 
 }
+// Declare WooCommerce support
+add_action( 'after_setup_theme', 'woocommerce_support' );
+function woocommerce_support() {
+add_theme_support( 'woocommerce' );
+}
+// WooCommerce number of products shown
+add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );
 
 // // The code below is useful when you want the image to resize to
 //    if (has_post_thumbnail()) {
index d9c2e2c..f9917ea 100644 (file)
@@ -19,7 +19,7 @@
                                 <div id="cart-login" class="small-12 medium-5 large-3 columns right">
                                     <ul>
                                         <li><a>View Cart</a></li>
-                                        <li><a>Register / Login</a></li>
+                                        <li><a>Register</a> / <a>Login</a></li>
                                     </ul>
                                 </div>
                                 <div class="large-4 columns show-for-large-up">
index 8f0d10d..bef202d 100644 (file)
                                 <header class="entry-header">
                                     <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
                                     <?php if ( has_post_thumbnail() ):?>
+                                             <?php if (get_post_type( $post ) != "ai1ec_event") { ?>
                                     <div class="featured-image-wrap"><?php the_post_thumbnail("large"); ?></div>
+                                    <?php } ?>
                                     <?php endif; ?>
                                     <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
                                 </header>
-
-                                <?php if (get_post_type( $post ) != "ai1ec_event") { ?>
-                                <div id="addthis_wrapper">
-                                    <!-- AddThis Button BEGIN -->
-                                    <div class="addthis_toolbox addthis_default_style ">
-                                        <a class="addthis_counter addthis_pill_style right"></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-5135fe4558d287a9"></script>
-                                    <!-- AddThis Button END -->
-                                </div><!--/#addthis_wrapper-->
-                                <?php } ?>
                                 <?php echo the_content(); ?>
-                                <footer class="entry-meta small-12 medium-10 center">
-                                    <?php $post_categories = wp_get_post_categories( get_the_ID() );
-                                    $cats = array();
-                                    echo 'This entry was posted ';
-                                    if (has_category()) {
-                                        echo 'in ';
-                                        foreach($post_categories as $c){
-                                            $cat = get_category( $c );
-                                            $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
-                                            echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>, ';
-                                        }
-                                    }
-                                    $post_tags = wp_get_post_tags( get_the_ID() );
-                                    $tags = array();
-                                    if (has_tag( )) {
-                                        echo ' and tagged ';
-                                        foreach($post_tags as $t){
-                                            $tag = get_tag( $t );
-                                            $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug );
-                                            echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
-                                        }
-                                    }
-                                    echo ' on ';
-                                    echo ' <span class="meta date"> ' . the_time('F jS, Y') . '</span>';
-                                    ?>
-                                </footer>
                             </article>
                             <?php if ( comments_open() || get_comments_number() ) :
                             comments_template();
                             endif; ?>
-                        </div><!--/.small-12 .columns-->
-                    </div><!--/.row-->
-                </div><!--/.small-11 .small-centered .columns-->
-            </div><!--/.row .blog-post-container-->
+                        </div>
+                    </div>
+                </div>
+            </div>
             <?php endwhile; ?>
             <?php else: ?>
-            <?php if ( comments_open() || get_comments_number() ) :
-            comments_template();
-            endif; ?>
-        </div>
-    </div>
-    </div>
-</div>
-<?php endwhile; ?>
-<?php else: ?>
             <div id="post-404" class="noposts">
                 <p><?php _e('Sorry, no results were found.');?></p>
             </div><!-- /#post-404 -->
             <?php endif;?>
-        </div><!--/#blog-posts-over-->
+        </div>
         <?php get_template_part('parts/blog-sidebar-r'); ?>
-    </div><!--/.row-->
+    </div>
     <?php get_footer(); ?>
index f044d45..827768d 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             WooThemes
  * @package    WooCommerce/Templates
- * @version     2.4.0
+ * @version     2.5.2
  */
 
 if ( ! defined( 'ABSPATH' ) ) {