Skip to content

Instantly share code, notes, and snippets.

@todiadiyatmo
Last active August 29, 2015 14:07
Show Gist options
  • Save todiadiyatmo/7d21b897e0f193b7cc9e to your computer and use it in GitHub Desktop.
Save todiadiyatmo/7d21b897e0f193b7cc9e to your computer and use it in GitHub Desktop.
WP Register Post Type
<?php
/*
* REGISTER JOB POSTS TYPE
*/
function jobs_post_type()
{
$config = array(
'label' => __( 'Jobs', 'jobs' ),
'description' => __( 'Jobs', 'jobs' ),
'supports' => array( 'thumbnail','title', 'comments', 'editor', 'custom-fields', ),
'hierarchical' => false,
'public' => true,
'rewrite' => array( 'slug' => 'jobs' ),
'has_archive' => true
);
register_post_type('job', $config);
}
add_action('init', 'jobs_post_type');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment