Created
March 4, 2012 06:34
-
-
Save BronsonQuick/1971046 to your computer and use it in GitHub Desktop.
A basic Testimonials Custom Post Type for WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php add_action( 'init', 'sennza_register_cpt_testimonial' ); | |
function sennza_register_cpt_testimonial() { | |
$args = array( | |
'public' => true, | |
'query_var' => 'testimonial', | |
'rewrite' => array( | |
'slug' => 'testimonials', | |
'with_front' => false | |
), | |
'supports' => array( | |
'title', | |
'editor', | |
'author', | |
'thumbnail', | |
'revisions' | |
), | |
'labels' => array( | |
'name' => 'Testimonials', | |
'singular_name' => 'Testimonial', | |
'add_new' => 'Add New Testimonial', | |
'add_new_item' => 'Add New Testimonial', | |
'edit_item' => 'Edit Testimonial', | |
'new_item' => 'New Testimonial', | |
'view_item' => 'View Testimonial', | |
'search_items' => 'Search Testimonials', | |
'not_found' => 'No testimonials found', | |
'not_found_in_trash' => 'No testimonials found in Trash', | |
), | |
); | |
register_post_type( 'testimonial', $args ); | |
}?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment