Skip to content

Instantly share code, notes, and snippets.

View daltonrooney's full-sized avatar

Dalton Rooney daltonrooney

View GitHub Profile
@daltonrooney
daltonrooney / acf-page-ancestor-location-rule.php
Created October 5, 2015 22:18 — forked from Hube2/acf-page-ancestor-location-rule.php
Advanced Custom Fields - Page Ancestor Custom Location Rule
<?php
/*
ACF cusomt location rule : Page Ancestor
*/
add_filter('acf/location/rule_types', 'acf_location_rules_page_ancestor');
function acf_location_rules_page_ancestor($choices) {
$choices['Page']['page_ancestor'] = 'Page Ancestor';
return $choices;
}
@daltonrooney
daltonrooney / wp_custom_title_placeholder_text.php
Created September 24, 2015 18:46 — forked from isGabe/wp_custom_title_placeholder_text.php
WordPress: Custom placeholder text for custom post type title input box #snippet #WordPress
<?php
/*
replacing the default "Enter title here" placeholder text in the title input box
with something more descriptive can be helpful for custom post types
place this code in your theme's functions.php or relevant file
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963
*/
<?php
/**
* Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes.
*
* <p>Because Wordpress generates all image sizes on first upload, if you change
* theme or size settings after the upload, there won't be a matching file for
* the requested size.<br/>
* This filter addresses the problem of the default downsize process laoding
* a large file and scaling it down in the browser if it doesn't find the right
* size image. This can cause large files to be loaded unnecessarily and will
<?php
/**
* Plugin Name: WooCommerce Disable PayPal for Subscriptions
* Plugin URI: https://gist.github.com/thenbrent/6641526
* Description: Want to disable PayPal for subscription purchases, but still offer it as an option for buying one-off products? Activate this plugin.
* Author: Brent Shepherd
* Author URI: http://find.brentshepherd.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
<?php $args = array(
'numberposts' => -1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'custom_post_type_here',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'custom_field_key_name',
<?php
/**
* The Header for the template.
*
* @package WordPress
*/
$pp_theme_version = '1.0';
?><!DOCTYPE html>