Creating Custom Templates

1.2

In case you need to create your own templates for Helpie’s Articles, you can register a customer template using this snippet.

 

function set_custom_helpie_template($template){
// For single page
if ( is_singular('pauple_helpie') ) {
$template = get_stylesheet_directory().'/single-pauple_helpie.php';
break;
}

// For category page
if ( is_tax( ‘helpdesk_category’) ) {
$template = get_stylesheet_directory().’/tax-pauple.php’;
}

// For the main archive page of Helpdesk Articles
if( is_post_type_archive(‘pauple_helpie’){
$template = get_stylesheet_directory().’/archive-pauple.php’;
}
return $template;
}
add_filter(‘template_include’,’set_custom_helpie_template’);

Last updated by Essekia on August 9, 2017