Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Created main files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmc12028 committed Jul 24, 2015
1 parent ae03b59 commit 0410914
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uc-guides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jQuery(document).ready(function($){

});
71 changes: 71 additions & 0 deletions uc-guides.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php
/**
* Plugin Name: UC Guides
* Description: Awesome!
* Version: 1.0
* Author: Chris Cerrigione and Andrew Bacon
*/
function create_custom_guide_post_type(){
$labels = array(
'name' => 'Guides',
'singular_name' => 'Guide',
'add_new' => 'New Guide',
'add_new_item' => 'Add New Guide',
'edit_item' => 'Edit Guide',
'view_item' => 'View Guide',
'search_items' => 'Search Guides'
);

$args = array(
'label' => 'Guides',
'labels' => $labels,
'description' => 'Awesome',
'public' => true,
'menu_position' => 35,
'menu_icon' => 'dashicons-media-document',
'supports' => array( 'title','tags', 'thumbnail', 'revisions', 'page-attributes','author', 'editor' ),
'has_archive' => true
);

register_post_type( 'guide', $args );

register_taxonomy( 'guide_category', 'guide',
array(
'label' => 'Guide Categories',
'labels' => array(
'name' => 'Guide Categories',
'singular_name' => 'Guide Category',
'search_items' => 'Search Guide Categories',
'edit_item' => 'Edit Guide Category',
'view_item' => 'View Guide Category',
'update_item' => 'Update GuideCategory',
'add_new_item' => 'Add new Guide Category',
'new_item_name' => 'New Guide Category'
),
'public' => true,
'hierarchical' => true,
'rewrite' => array('hierarchical' => true )
)
);

register_taxonomy( 'guide_tag', 'guide',
array(
'label' => 'Tags',
'labels' => array(
'name' => 'Tags',
'singular_name' => 'Tag',
'search_items' => 'Search Tags',
'edit_item' => 'Edit ',
'view_item' => 'Tag.viewitem',
'update_item' => 'Update Tag',
'add_new_item' => 'Add new tags',
'new_item_name' => 'Tag.newitemname'
),
'public' => true,
'hierarchical' => false
)
);

}
add_action( 'init', 'create_custom_guide_post_type', 0 );
?>

0 comments on commit 0410914

Please sign in to comment.