Skip to content

Instantly share code, notes, and snippets.

View michaelschofield's full-sized avatar

Michael Schofield michaelschofield

View GitHub Profile
<?php
/**
* Plugin Name: ADVWP Library Event Manager
* Plugin URI: http://classes.alaeditions.org/course/view.php?id=225
* Description: A simple library event management system.
* Version: 0.3
* Author: Your Name!
* Author URI: http://www.yourwebsite.com
*/
<?php
/**
* The template for displaying all single events. This specific template
* is based of Twentyfifteen single.php. Certain styles and Twentyfifteen-specific functions
* may not translate if used with another theme.
*/
get_header(); ?>
<?php
/**
* The template for displaying all single events. This specific template
* is based of Twentyfifteen single.php. Certain styles and Twentyfifteen-specific functions
* may not translate if used with another theme.
*/
get_header(); ?>
<?php
// As we did with our event post type, we will
// register our taxonomies INSIDE a function, that
// we will use to hook into WordPress as soon as
// it loads.
function advwp_create_event_taxonomies() {
// The "Event Type" Taxonomy
register_taxonomy(
@michaelschofield
michaelschofield / register_taxonomy.php
Last active August 29, 2015 14:18
advwp_event_manager_taxonomies.php
<?php
// As we did with our event post type, we will
// register our taxonomies INSIDE a function, that
// we will use to hook into WordPress as soon as
// it loads.
function advwp_create_event_taxonomies() {
// The "Event Type" Taxonomy
register_taxonomy(
<?php
/**
* Plugin Name: ADVWP Library Event Manager
* Plugin URI: http://classes.alaeditions.org/course/view.php?id=225
* Description: A simple library event management system.
* Version: 0.1.0
* Author: Your Name!
* Author URI: http://www.yourwebsite.com
*/
<?php
// A PHP Array (or collection) of various settings informing how "Events" will work.
// We will be referring to these $options at the bottom of the file, using
// register_post_type( 'event', $options );
$options = array(
// Another PHP Array setting all the "Event" labels.
'labels' => array(
@michaelschofield
michaelschofield / advwp_plugin_manager.php
Created March 23, 2015 02:30
Example of a simple plugin opening comment.
<?php
/**
* Plugin Name: ADVWP Library Event Manager
* Plugin URI: http://classes.alaeditions.org/course/view.php?id=225
* Description: A simple library event management system.
* Version: 0.1.0
* Author: Your Name!
* Author URI: http://www.yourwebsite.com
*/
<?php // This is how all php files have to start
/**
* Plugin Name: Name of the plugin, must be unique.
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
* Description: A brief description of the plugin.
* Version: The plugin's version number. Example: 1.0.0
* Author: Name of the plugin author
* Author URI: http://URI_Of_The_Plugin_Author
* Text Domain: Optional. Plugin's text domain for localization. Example: mytextdomain
@michaelschofield
michaelschofield / style.css
Created March 15, 2015 21:54
An example of a WordPress Theme Stylesheet
/*
Theme Name: Anything You Want
Theme URI: http://wordpress.org/themes/twentythirteen
Author: Firstname Lastname
Author URI: http://firstnamelastname.com/
Description: This is an example theme, and anything I write on this "description" line will be the meat and potatoes of the WordPress theme menu
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready