Skip to content

Instantly share code, notes, and snippets.

View rogierborst's full-sized avatar

Rogier Borst rogierborst

  • Amersfoort, the Netherlands
View GitHub Profile
@rogierborst
rogierborst / gist:2786753
Created May 25, 2012 08:52 — forked from GaryJones/gist:1258784
Using the template_include filter in WordPress
<?php
add_filter( 'template_include', 'ja_template_include' );
function ja_template_include( $template ) {
if ( !is_category() )
return $template;
$category_info = get_category(get_query_var('cat'));
if ( $category_info->parent == 0 )