Skip to content

Instantly share code, notes, and snippets.

View bentedder's full-sized avatar

Ben Tedder bentedder

  • Smarsh
  • St Paul, MN
View GitHub Profile
@bentedder
bentedder / vertical-scroll-shortcode.php
Created April 24, 2013 17:18
A shortcode for using the Vertical Scroll plugin in your posts or pages
<?php
/*
Plugin Name: Vertical Scroll Shortcode
URI: http://www.bentedder.com
Description: Enhance the "Vertical Scroll" plugin with a shortcode to use in posts
Version: 1.0
Author: Ben Tedder
Author URI: http://www.bentedder.com
License: GPL2
*/
/** Register code custom post type
from http://www.briangardner.com/custom-post-types/
*/
add_action( 'init', 'code_post_type' );
function code_post_type() {
register_post_type( 'code',
array(
'labels' => array(
'name' => __( 'Code' ),
'singular_name' => __( 'Code Snippets' ),
/** Enqueue a custom javascript file in functions.php */
add_action( 'wp_enqueue_scripts', 'bt_add_scripts' );
function bt_add_scripts() {
wp_register_script( 'mystuff', get_bloginfo('stylesheet_directory').'/myscripts.js' );
wp_enqueue_script( 'mystuff' );
}
@bentedder
bentedder / wp-cycle.php
Last active December 11, 2015 22:39
Update of WP-Cycle to include scrollHorz and previous/next buttons
<?php
/*
Plugin Name: WP-Cycle
Plugin URI: http://www.nathanrice.net/plugins/wp-cycle/
Description: This plugin creates an image slideshow from the images you upload using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images.
Version: 0.1.13
Author: Nathan Rice
Author URI: http://www.nathanrice.net/
This plugin inherits the GPL license from it's parent system, WordPress.