Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_post_type() {
- register_post_type( 'news_article',
- array(
- 'labels' => array(
- 'name' => __( 'News' ),
- 'singular_name' => __( 'Article' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'news_article'),
- 'supports' => array('thumbnail', 'editor','title', 'excerpt', 'editor', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'events',
- array(
- 'labels' => array(
- 'name' => __( 'Events' ),
- 'singular_name' => __( 'Event' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'events'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'videos',
- array(
- 'labels' => array(
- 'name' => __( 'Videos' ),
- 'singular_name' => __( 'Video' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'videos'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'products',
- array(
- 'labels' => array(
- 'name' => __( 'Products' ),
- 'singular_name' => __( 'Product' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'products'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'sponsors',
- array(
- 'labels' => array(
- 'name' => __( 'Sponsors' ),
- 'singular_name' => __( 'Sponsor' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'sponsors'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'projects',
- array(
- 'labels' => array(
- 'name' => __( 'Projects' ),
- 'singular_name' => __( 'Project' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'projects'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'opinions',
- array(
- 'labels' => array(
- 'name' => __( 'Opinions' ),
- 'singular_name' => __( 'Opinion' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'opinions'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- register_post_type( 'tenders',
- array(
- 'labels' => array(
- 'name' => __( 'Tenders' ),
- 'singular_name' => __( 'Tender' ),
- ),
- 'taxonomies' => array('category','post_tag'),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'tenders'),
- 'supports' => array('thumbnail', 'editor','title', 'editor', 'excerpt', 'author', 'thumbnail',
- 'comments', 'revisions', 'custom-fields',),
- )
- );
- flush_rewrite_rules();
- }
- add_action( 'init', 'create_post_type' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement