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

Created main files #1

Merged
merged 1 commit into from
Jul 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 );
?>