Skip to content

Instantly share code, notes, and snippets.

View jakubferenc's full-sized avatar

Jakub Albert Ferenc jakubferenc

View GitHub Profile
@jakubferenc
jakubferenc / README.md
Created March 13, 2017 23:15 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@jakubferenc
jakubferenc / functions.php
Created March 5, 2017 18:22 — forked from fuyuko/functions.php
Cheatsheet - WooCommerce Customization in functions.php
//Add a stylesheet after default style.css
wp_enqueue_style( 'my-css', get_template_directory_uri() . 'my-css.css', array('themename-style'));
//WooCommerce - Sort products by SKU
add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_catalog_orderby');
function custom_woocommerce_catalog_orderby( $args ) {
$args['meta_key'] = '_sku';
$args['orderby'] = 'meta_value';
$args['order'] = 'asc';
return $args;
@jakubferenc
jakubferenc / gist:3caca798edf1c1b66db730739d86c333
Created October 21, 2016 13:26 — forked from corsonr/gist:7215762
WooCommerce: Hide Checkout Fields For Virtual Products
<?php
add_filter( 'woocommerce_checkout_fields' , 'woo_remove_billing_checkout_fields' );
/**
* Remove unwanted checkout fields
*
* @return $fields array
*/
function woo_remove_billing_checkout_fields( $fields ) {
@jakubferenc
jakubferenc / .gitignore
Created October 7, 2016 19:52 — forked from salcode/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore