Skip to content

Instantly share code, notes, and snippets.

@digisavvy
Created May 29, 2018 23:37
Show Gist options
  • Select an option

  • Save digisavvy/0101229379d3226f07b95eb346b4dd14 to your computer and use it in GitHub Desktop.

Select an option

Save digisavvy/0101229379d3226f07b95eb346b4dd14 to your computer and use it in GitHub Desktop.
<?php
/**
* Load the appropriate post type for single post
*/
function dgs_load_chscpr_event_page_template( $template ) {
if ( get_post_type() == 'chscpr_event_reg' ) {
return plugin_dir_path( __FILE__ ) . 'views/single-chscpr-event.php';
}
return $template;
}
add_filter( 'template_include', 'dgs_load_chscpr_event_page_template', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment