Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@orionrush
orionrush / WooCommerce XNum to cart
Last active August 29, 2015 14:01 — forked from claudiosanches/add-to-cart.php
A quick plugin to add a quantity to WooCommerce's 'add to cart' button
<?php
/**
* Plugin Name: WooCommerce XNum to cart
* Plugin URI: http://claudiosmweb.com/snippets/woocommerce-loop-de-produtos-com-quantidade/
* Source: http://docs.woothemes.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/
* Description: Add x-number of items feild to the 'add to cart' button in WooCommerce
* Version: .10
* Author: orionrush
* Note: You will have to style the button css according to your theme's needes.
*/
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity.
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
/*
This widget shows Recent Posts on your Tumblr blog.
Its dependency is jQuery.
Usage:
1) Add html:
<div id="recent-posts"></div>
2) Add code into the <head>:
# ~/.osx — http://mths.be/osx
# root check
if [[ $EUID -ne 0 ]]; then
echo "################################";
echo "## YOU ARE NOT RUNNING AS ROOT #";
echo "################################";
echo "#";
echo "# USAGE: sudo $0";
exit;
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert,
.validation_error,