<?php global $post; //build a file path, based on post type for a partial to attempt to load $partial = trailingslashit( get_stylesheet_directory_uri() ) . 'partials/' . $post->post_type . '.html'; //check if that file exists if ( file_exists( $partial ) ) { //if it exists use it as our template $template = file_get_contents( $partial ); }else{ //if not, use the default template $template = null; } echo cep_render_easy_pod( 'hats', null, $template );