Skip to content

Instantly share code, notes, and snippets.

@energy0m
energy0m / product-output
Last active December 20, 2015 07:39
this is the product-output that gores with the last one...
<?php
global $my_cats;
foreach ($my_cats as $cat) {
//print_r($cat);
$category_id = $cat->term_id;
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
$image = wp_get_attachment_url( $thumbnail_id );
@energy0m
energy0m / functions
Last active December 20, 2015 07:39
This is an attempt at creating a woocommerce product category shortcode for the Neighborhood theme
<?php
function my_cats( $atts ) {
global $woocommerce_loop;
global $my_cats;
extract( shortcode_atts( array (
'ids' => '',
'orderby' => 'name',
'order' => 'DESC',
'columns' => '4',
'hide_empty' => 1,