Skip to content

Instantly share code, notes, and snippets.

View WebEndevSnippets's full-sized avatar

Bruce Munson WebEndevSnippets

View GitHub Profile
@GaryJones
GaryJones / functions.php
Created February 12, 2012 04:01 — forked from billerickson/functions.php
Genesis Grid Loop Advanced
<?php
/**
* Possibly amend the loop.
*
* Specify the conditions under which the grid loop should be used.
*
* @author Bill Erickson
* @author Gary Jones
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/
<?php
/**
* Grid Loop Pagination
* Returns false if not grid loop.
* Returns an array describing pagination if is grid loop
*
* @author Bill Erickson
* @link http://www.billerickson.net/a-better-and-easier-grid-loop/
*
@norcross
norcross / login-string-check.php
Created December 20, 2012 01:15
check login URL for specific query string
<?php
/*
* Check the URL of the WordPress login
* page for a specific query string
*
* assumes login string is
* http://mysite.com/wp-login.php?question=answer
*/
function rkv_login_stringcheck() {
@bradyvercher
bradyvercher / cache-post-thumbnails.php
Created January 9, 2014 17:21
WordPress: Cache post thumbnail attachments that appear in a WP_Query loop.
<?php
/**
* Plugin Name: Cache Post Thumbnails
* Description: Prime the post thumbnails cache for individual loops.
* Version: 1.0.0
* Author: Brady Vercher
* Author URI: http://www.blazersix.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@billerickson
billerickson / genesis-custom-loop-pagination.php
Created July 31, 2012 15:59
Genesis custom loop with pagination
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@tmoitie
tmoitie / gist:9808555
Last active April 18, 2024 18:56
Wordpress: Gravity Forms List to ACF Repeater post save
<?php
add_action('gform_after_submission', 'gfToAcfListToRepeater', 10, 2);
function gfToAcfListToRepeater($entry, $form)
{
foreach ($form['fields'] as $field) {
if (!($field['type'] == 'post_custom_field' && $field['inputType'] == 'list' && $field['enableColumns'] == true)) {
continue;
}
$id = $field['id'];