Skip to content

Instantly share code, notes, and snippets.

Be the reason someone smiles today.

Kevin Donnigan anythinggraphic

Be the reason someone smiles today.
View GitHub Profile
feastdesignco / add_woocom_support
Created Aug 15, 2019
Adds back in woocommerce functionality removed from Feast themes 4.1.5+ - not tested
View add_woocom_support
// Add support for WooCommerce features.
add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_theme_support( 'wc-product-gallery-zoom' );
if ( class_exists( 'WooCommerce', false ) ) {
require_once FEAST_DIR . 'lib/woocommerce.php'; // note: doesn't exist anymore
spivurno / gw-gravity-forms-unrequire-required-fields-usage.php
Last active Jun 13, 2022
Gravity Wiz // Gravity Forms Unrequire Required Fields for Speedy Testing
View gw-gravity-forms-unrequire-required-fields-usage.php
# Basic Usage
# requires that the user be logged in as an administrator and that a 'gwunrequire' parameter be added to the query string
new GWUnrequire();
# Enable for All Users (Including Visitors)
# still requires the 'gwunrequire' parameter be added to the query string
new GWUnrequire( array(
ryansechrest /
Last active Jan 29, 2023
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
billerickson / genesis-custom-loop-pagination.php
Created Jul 31, 2012
Genesis custom loop with pagination
View genesis-custom-loop-pagination.php
/* Template Name: Test */
* Genesis custom loop
function be_custom_loop() {
global $post;
// arguments, adjust as needed
jo-snips / events-conditional-wrappers.php
Last active May 19, 2022
The Events Calendar: Basic Conditional Wrappers
View events-conditional-wrappers.php
/* Conditional Logic to Detect Various Event Related Views/Pages
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page