How to use a dedicated template for the Custom Post Type from a plugin?

Change this line:

function include_reviews_template(){

To this:

function include_reviews_template( $template_path ) {

When get_post_type() == 'reviews' is false you are returning an unset variable ($template_path). This change should send the value passed to the function by WordPress.

Leave a Comment