It is used by post type Plants:
<?php
/**
* Ultimate Post Types Export
*
* This code will setup a post type called Plants.
* The register_plants_post_type function does not require either Ultimate Fields or Ultimate Post Types
* to be installed or enabled.
*
* Add this code directly to you functions.php file or a file that's included in it.
*
* For more information, please visit https://ultimate-fields.com/
*/
add_action( 'init', 'register_plants_post_type' );
function register_plants_post_type() {
register_post_type( 'plants', array (
'capability_type' => 'post',
'query_var' => true,
'supports' =>
array (
0 => 'title',
1 => 'editor',
2 => 'author',
3 => 'thumbnail',
4 => 'excerpt',
5 => 'comments',
6 => 'revisions',
),
'hierarchical' => false,
'public' => true,
'show_in_menu' => true,
'show_ui' => true,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'has_archive' => true,
'can_export' => true,
'labels' =>
array (
'name' => 'Plants',
'singular_name' => 'Plant',
'add_new' => 'Add Plant',
'add_new_item' => 'Add Plant',
'edit_item' => 'Edit Plant',
'new_item' => 'New Plant',
'view_item' => 'View Plant',
'search_items' => 'Search Plants',
'not_found' => 'No Plants found',
'not_found_in_trash' => 'No Plants found in Trash',
'parent_item_colon' => 'Parent Plant:',
'menu_name' => 'Plants',
),
) );
}
/**
* The code below changes the template for the Plants post type.
*
* You can omit this function if you've already created a single-plants.php template in your theme.
*/
add_action( 'template_redirect', 'change_plants_template' );
function change_plants_template() {
# The template does not need to be changed unless a singular Plants post is being viewed.
if( ! is_singular( 'plants' ) ) {
return;
}
locate_template( '', true, false );
exit;
}
?>