Skip to content

Instantly share code, notes, and snippets.

View LWS-Web's full-sized avatar

LWS LWS-Web

View GitHub Profile
@LWS-Web
LWS-Web / archive-product.php
Last active June 22, 2018 13:03
WooCommerce altered archive-product.php / separated code for "is_shop()" and "is_product_category()"
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive
*
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@LWS-Web
LWS-Web / archiv-product.php
Last active June 18, 2018 12:40
WooCommerce altered shop loop / show category > sub categories > products on archive page
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive
*
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@LWS-Web
LWS-Web / woocommerce-overwrite-order-columns.php
Last active March 27, 2018 15:33
WooCommerce, add customer mail to the order admin list.
<?php
/*
Plugin Name: WooCommerce Overwrite Order Columns
Plugin URI:
Description: Adds the customers mailadress back to the order admin list.
Author: Mo
Version: 0.1
Author URI:
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@LWS-Web
LWS-Web / archiv-product.php
Created February 22, 2017 13:53
WooCommerce altered shop loop / products per category display
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive
*
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@LWS-Web
LWS-Web / kirki-collapsible-controls.js
Last active December 5, 2016 13:07
Kirki Collapsible Controls
jQuery(document).ready(function($){
// add collapse feature to 'typography' and 'spacing' controls
var controlClasses = '.customize-control-kirki-typography, .customize-control-kirki-spacing';
// get translated link title
var linkTitle = kirki_collapsible_controls_object.link_title;
// hide all '.wrapper' instances inside the above defined controls
$(controlClasses).find('.wrapper').hide();