Skip to content

Instantly share code, notes, and snippets.

@malarkey
malarkey / Contract Killer 3.md
Last active July 5, 2024 08:43
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@ramseyp
ramseyp / hide-editor.php
Created November 12, 2012 15:48
Hide the content editor for certain pages in WordPress
<?php
/**
* Hide editor on specific pages.
*
*/
add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.
@malarkey
malarkey / Three Wise Monkeys.md
Created December 2, 2012 14:26
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

define( 'CHILD_THEME_VERSION', filemtime( get_stylesheet_directory() . '/style.css' ) );
@jaredatch
jaredatch / gist:5617223
Last active May 18, 2016 03:05
GravityForms doesn't have a filter for the * required marker, so this JS changes it.
jQuery(document).ready(function($) {
$("span.gfield_required").html(function(index, text) {
return text.replace("*", "Required");
});
});
@jdevalk
jdevalk / archive-speaking_event.php
Last active December 12, 2021 20:13
Genesis helper code for schema
<?php
add_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 );
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 );
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 );
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 );
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 );
/**
* We'll use the post info output to add more meta data about the event.
@srikat
srikat / functions.php
Last active April 22, 2021 11:48
Showing a different menu in Primary Navigation location conditionally in Genesis
<?php
//* Do NOT include the opening php tag
add_action( 'genesis_before', 'sk_replace_menu_in_primary' );
/**
* Conditionally replace Custom Menu in Primary Navigation.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/conditionally-replace-navigation-menu-genesis/
*/
@JiveDig
JiveDig / genesis_custom_loop.php
Last active March 4, 2020 15:33
wp_query using genesis_custom_loop. To alter content use standard genesis add_action and remove_action hooks
<?php
//* Custom loop WITH pagination
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'bhl_do_resident_query' );
function bhl_do_resident_query() {
global $paged;
global $query_args;
@A5hleyRich
A5hleyRich / cron-test.php
Last active July 26, 2022 17:25
WordPress Cron and Email Test
<?php
/**
* Plugin Name: Cron Test
* Plugin URI: https://gist.github.com/A5hleyRich/6de1712ce5f46662c8ba
* Description: WordPress cron and email test.
* Author: Ashley Rich
* Version: 1.0
* Author URI: http://ashleyrich.com
*/
@jaredatch
jaredatch / functions.php
Created August 5, 2015 14:57
Set fallback images for Genesis
<?php
/**
* Set default Genesis images
*
* @since 1.0.0
* @param string $output
* @param array $args
* @return array
*/
function ja_default_genesis_image( $output, $args ) {