Skip to content

Instantly share code, notes, and snippets.

View PurpleHippoDesign's full-sized avatar

Angie Vale PurpleHippoDesign

View GitHub Profile
@salcode
salcode / .gitignore
Last active April 3, 2024 18:38
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@billerickson
billerickson / gist:3698476
Last active February 23, 2024 16:49 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@luetkemj
luetkemj / wp-query-ref.php
Last active February 6, 2024 14:25
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@ChrisButterworth
ChrisButterworth / converter.php
Created September 5, 2018 12:26
Webp converter for WordPress
<?php
namespace Converter;
use WebPConvert\WebPConvert;
class Converter
{
public $lazy = false;
public function __construct($lazy = false)
@spivurno
spivurno / gw-gravity-forms-map-fields-to-field.php
Last active May 22, 2023 17:27
Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
<?php
/**
* Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
*
* Usage
*
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated.
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field.
*
* Basic Fields
@robneu
robneu / wordpress-typekit-enqueue.php
Last active January 17, 2023 23:04 — forked from FernE97/typekit-enqueue.php
Enqueue typekit fonts to WordPress using wp_enqueue_scripts.
<?php
/**
* Enqueue typekit fonts into WordPress using wp_enqueue_scripts.
*
* @author Robert Neu
* @author Eric Fernandez
* @copyright Copyright (c) 2014, Robert Neu
* @license GPL-2.0+
* @link http://typekit.com
*/
@rickrduncan
rickrduncan / genesis-page-titles-html5.php
Last active August 1, 2022 11:16
How to remove page titles from Genesis child themes using XHTML and HTML5 methods.
<?php
//* Do NOT include the opening php tag
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@paaljoachim
paaljoachim / genesis-featured-image.php
Last active April 16, 2022 14:52
Featured image for Genesis themes. 1. Sets the featured image. 2. If no featured image get image from category. 3. If no category image then get the first post image. 4. If no post image or category image then sets a fallback image.
@GaryJones
GaryJones / functions.php
Last active April 19, 2021 23:12
Apply superfish enhancement to usual Genesis menus with different settings.
<?php
// For Genesis 2.0.0 and later:
add_filter( 'genesis_superfish_args_url', 'prefix_superfish_args_url' );
/**
* Filter in URL for custom Superfish arguments.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/change-superfish-arguments
@cparkinson
cparkinson / facetwp-autoindex-child-terms.php
Created May 13, 2020 16:22
FacetWP - automatically index all child terms when a parent taxonomy term is checked
/**
* Filter to customize FacetWP, should be pasted in FacetWP's "Custom Hooks" plugin
*
* Made for a "location" FacetWP autocomplete filter that uses a taxonomy "location"
* consisting of parent county terms and child city terms
*
* When indexing, for every post, for the location taxonomy filter,
* Check to see if it has any location taxonomy set
* Check to see if selected location taxonomy has children (i.e. selected county has cities)
* Create a new index row for each child city