summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php5
-rw-r--r--inc/movie.php60
2 files changed, 65 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index ad5e2a7..3dc9989 100644
--- a/functions.php
+++ b/functions.php
@@ -59,3 +59,8 @@ function remulus_modify_contact_methods($profile_fields) {
return $profile_fields;
}
add_filter('user_contactmethods', 'remulus_modify_contact_methods');
+
+/**
+* Custom template tags for this theme.
+*/
+require get_template_directory() . '/inc/movie.php';
diff --git a/inc/movie.php b/inc/movie.php
new file mode 100644
index 0000000..bf31138
--- /dev/null
+++ b/inc/movie.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * remulus movie content type
+ *
+ * @package remulus
+ */
+
+function remulus_create_post_type() {
+
+ register_post_type('movie',
+ array(
+ 'labels' => array(
+ 'name' => __('Movies'),
+ 'singular_name' => __('Movie'),
+ 'add_new' => 'Add New',
+ 'add_new_item' => 'Add New Movie',
+ 'edit' => 'Edit',
+ 'edit_item' => 'Edit Movie',
+ 'new_item' => 'New Movie',
+ 'view' => 'View',
+ 'view_item' => 'View Movie',
+ 'search_items' => 'Search Movie',
+ ),
+ 'public' => true,
+ 'has_archive' => false,
+ 'hierarchical' => false,
+ 'has_archive' => false,
+ 'rewrite' => false,
+ 'menu_icon' => 'dashicons-editor-video',
+ 'capability_type' => 'post',
+ )
+ );
+}
+add_action('init', 'remulus_create_post_type');
+
+
+function remulus_create_movie_taxonomies() {
+ register_taxonomy('movie-type', array('movie'),
+ array(
+ 'labels' => array(
+ 'name' => _x( 'Movie Categories', 'taxonomy general name' ),
+ 'singular_name' => _x( 'Movie Category', 'taxonomy singular name' ),
+ 'search_items' => __( 'Search Movie Category' ),
+ 'all_items' => __( 'All Movie Categories' ),
+ 'parent_item' => __( 'Parent Movie Category' ),
+ 'parent_item_colon' => __( 'Parent Movie Category:' ),
+ 'edit_item' => __( 'Edit Movie Category' ),
+ 'update_item' => __( 'Update Movie Category' ),
+ 'add_new_item' => __( 'Add New Movie Category' ),
+ 'new_item_name' => __( 'New Genre Movie Category' ),
+ 'menu_name' => __( 'Movie Category' ),
+ ),
+ 'hierarchical' => true,
+ 'show_ui' => true,
+ 'show_admin_column' => true,
+ 'query_var' => true,
+ )
+ );
+}
+add_action( 'init', 'remulus_create_movie_taxonomies');