Skip to content

Instantly share code, notes, and snippets.

View mrjonwilson's full-sized avatar

Jonathan Wilson mrjonwilson

  • Standing Pine Media, LLC
  • Carthage, MS
View GitHub Profile
<?php
/*
Plugin Name: Custom Post Type Plugin
Description: Properties Custom Post Type.
*/
/* Start Adding Functions Below this Line */
// Our custom post type function
function create_posttype() {
register_post_type( 'Properties',
@mrjonwilson
mrjonwilson / backstretch-agency.php
Created May 6, 2014 03:15
Backstretch For Genesis
add_action( 'wp_enqueue_scripts', 'agency_enqueue_backstretch_scripts' );
function agency_enqueue_backstretch_scripts() {
//* Load scripts only if custom background is being used
if ( ! get_background_image() ) //Do I add something here?
return;
wp_enqueue_script( 'agency-pro-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'agency-pro-backstretch-set', get_bloginfo( 'stylesheet_directory' ).'/js/backstretch-set.js' , array( 'jquery', 'agency-pro-backstretch' ), '1.0.0' );
@mrjonwilson
mrjonwilson / Backstretch For Genesis
Created May 21, 2013 04:39
This is how to include jQuery Backstretch in a Genesis by StudioPress child theme: 1. Copy the following gist to your functions.php file. 2. Replace "themename" with the name of your theme.
//* Load Backstretch script and prepare images for loading
add_action( 'wp_enqueue_scripts', 'themename_enqueue_scripts' );
function themename_enqueue_scripts() {
// Load scripts only if custom background is being used
if ( ! get_background_image() )
return;
wp_enqueue_script( 'themename-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'themename-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'converge-backstretch' ), '1.0.0' );