I found it difficult to get Wordpress to render Kohana requests with the right template. I added a filter so that, for Kohana requests, it always uses the same page template.
add_filter('page_template', kohana_page_template_filter);
function is_kohana_request()
{
global $wp;
return ($wp->kohana->request != null) ? true : false;
}
function kohana_page_template_filter($template) {
if (is_kohana_request()) {
return locate_template(array('kohana.php'));
}
return $template;
}
For this code, you have to have a kohana.php template in your theme. Mine's pretty basic, but it would depend on your theme. It might be useful to be able to select a kohana page template from the WP admin.
I found it difficult to get Wordpress to render Kohana requests with the right template. I added a filter so that, for Kohana requests, it always uses the same page template.
For this code, you have to have a kohana.php template in your theme. Mine's pretty basic, but it would depend on your theme. It might be useful to be able to select a kohana page template from the WP admin.