Skip to content

Instantly share code, notes, and snippets.

View PurpleHippoDesign's full-sized avatar

Angie Vale PurpleHippoDesign

View GitHub Profile
@srikat
srikat / front-page.php
Last active September 21, 2017 14:25
Front Page Template to show CPT entries in a 3-column grid in Genesis. http://sridharkatakam.com/front-page-template-show-cpt-entries-3-column-grid-genesis/
<?php
/**
* To display entries from a Custom Post Type on site's front page in a 3-column responsive grid.
* URL: http://sridharkatakam.com/front-page-template-to-show-cpt-entries-in-a-3-column-grid-in-genesis/
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'sk_do_loop' );
/**
@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.
@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.
@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)
@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