+ Author URI: https://twitter.com/bozdoz/
+ Plugin Name: Rachael Simonds Media Posts
+ Description: A plugin for creating Photography, Print, Drawing, and Other media types for Rachael Simonds.
+add_action( 'init', 'add_all_custom_posts' );
+function add_all_custom_posts() {
+ 'title' => 'Photography',
+ 'title' => 'Other Media',
+ 'title' => 'Photography',
+ function getArgs ($arr) {
+ 'name' => _x( "$title", 'post type general name' ),
+ 'singular_name' => _x( "$name", 'post type singular name' ),
+ 'add_new' => _x( "Add New", "$name" ),
+ 'add_new_item' => __( "Add New $name" ),
+ 'edit_item' => __( "Edit $name" ),
+ 'new_item' => __( "New $name" ),
+ 'all_items' => __( "All $title" ),
+ 'view_item' => __( "View $name" ),
+ 'search_items' => __( "Search $title" ),
+ 'not_found' => __( "No $title found" ),
+ 'not_found_in_trash' => __( "No $title found in the Trash" ),
+ 'parent_item_colon' => '',
+ 'menu_name' => "$title"
+ 'description' => "Holds our $title and $name specific data",
+ 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
+ foreach ($allmedia as $arr) {
+ register_post_type($arr['name'], getArgs($arr) );
+/* shortcode for displaying all custom media posts */
+add_shortcode('rachael-simonds-media', 'displayMedia');
+function displayMedia () {
+ 'posts_per_page' => 40,
+ 'post_status' => 'publish');
+ $teams = get_posts( $args );
+ $html = '<div class="team-list">';
+ foreach ( $teams as $team ) {
+ $thumb_url = get_the_post_thumbnail_url($team->ID, array(400,400));
+ $permalink = get_permalink($team->ID);
+ $position = get_post_meta($team->ID, 'team_position', true);
+ $html .= "<a class=\"img-holder\"
+ title=\"$team->post_title\">
+ <span class=\"img img-block\"
+ style=\"background-image:url( $thumb_url );\">
+ <span class=\"img-screen\">
+ <span class=\"center-vertical\">
+ <span class=\"img-title\">$team->post_title</span>
+ <span class=\"img-subtitle\">$position</span>