mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 09:13:38 +01:00
add new Testimonials Custom Post Type
This commit is contained in:
parent
809bfde6d9
commit
5b42f1dfed
@ -29,6 +29,7 @@ require_once WPTHEME_INC . 'cpt-team.php';
|
||||
require_once WPTHEME_INC . 'cpt-career.php';
|
||||
require_once WPTHEME_INC . 'cpt-presscoverage.php';
|
||||
require_once WPTHEME_INC . 'cpt-event.php';
|
||||
require_once WPTHEME_INC . 'cpt-testimonial.php';
|
||||
|
||||
// Run the setup functions
|
||||
TenUp\ascribe\Core\setup();
|
||||
|
43
includes/cpt-testimonial.php
Normal file
43
includes/cpt-testimonial.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
add_action( 'init', 'ascribe_register_cpt_testimonial' );
|
||||
|
||||
function ascribe_register_cpt_testimonial() {
|
||||
$labels = array(
|
||||
"name" => "Testimonials",
|
||||
"singular_name" => "Testimonial",
|
||||
"menu_name" => "Testimonials",
|
||||
"all_items" => "All Testimonials",
|
||||
"add_new" => "Add New",
|
||||
"add_new_item" => "Add New Testimonial",
|
||||
"edit" => "Edit",
|
||||
"edit_item" => "Edit Testimonial",
|
||||
"new_item" => "New Testimonial",
|
||||
"view" => "View",
|
||||
"view_item" => "View Testimonial",
|
||||
"search_items" => "Search Testimonial",
|
||||
"not_found" => "No Testimonials found",
|
||||
"not_found_in_trash" => "No Testimonials found in Trash",
|
||||
"parent" => "Parent Testimonial",
|
||||
);
|
||||
|
||||
$args = array(
|
||||
"labels" => $labels,
|
||||
"description" => "",
|
||||
"public" => true,
|
||||
"show_ui" => true,
|
||||
"show_in_rest" => false,
|
||||
"has_archive" => false,
|
||||
"show_in_menu" => true,
|
||||
"exclude_from_search" => true,
|
||||
"capability_type" => "post",
|
||||
"map_meta_cap" => true,
|
||||
"hierarchical" => false,
|
||||
"rewrite" => false,
|
||||
"query_var" => true,
|
||||
|
||||
);
|
||||
register_post_type( "testimonial", $args );
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user