Skip to content

Instantly share code, notes, and snippets.

View GreenGeorge's full-sized avatar
🏠
Working from home

George Ananda GreenGeorge

🏠
Working from home
View GitHub Profile
@GreenGeorge
GreenGeorge / custom-posts-helper.php
Created April 22, 2012 11:03
Functions to quickly automate making custom post types in wordpress. Heavily based on Jeffrey Way's tutorial on nettuts
<?php
// ***** Declare function that buids the post type
function add_post_type($name, $args = array() ) {
add_action('init',function() use($name, $args) {
// make post type name capitalized
$upper = ucwords($name);
// make name acceptable