Skip to content

Instantly share code, notes, and snippets.

View joshuadavidnelson's full-sized avatar

Joshua Nelson joshuadavidnelson

View GitHub Profile
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active April 17, 2024 12:35
Using Git with Subversion Mirroring for WordPress Plugin Development
@jaredatch
jaredatch / gist:3764381
Last active October 10, 2015 22:58
Customize image size used in the loop by Genesis
<?php
/**
* Customize image size used in the loop by Genesis
*
* @author Jared Atchison
* @link http://jaredatchison.com/code/
* @param string $image_size
* @global array $wp_query
* @global int $loop_counter
* @return string
@WPsites
WPsites / gist:3935417
Created October 22, 2012 23:21
WPMU Gravity Form functions.php
<?php
/*
Filter the gravity form shortcode output to retreive the form from the main site
*/
add_filter('gform_shortcode_form', 'gform_shortcode_form_mu_override',10,3);
function gform_shortcode_form_mu_override( $shortcode_string, $attributes, $content ){
@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
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

…………………………

@mfields
mfields / theme-options.php
Created January 31, 2013 01:12
Sample theme options page for WordPress Themes.
<?php
/**
* _s Theme Options
*
* @package _s
* @since _s 1.0
*/
/**
* Register the form setting for our _s_options array.
function remove_post_type_page_from_search() {
global $wp_post_types;
$wp_post_types['page']->exclude_from_search = true;
}
add_action('init', 'remove_post_type_page_from_search');
@jdevalk
jdevalk / .htaccess
Last active November 28, 2023 20:28
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@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.
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@justintadlock
justintadlock / register-post-type.php
Last active October 22, 2023 05:55
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public