Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 14, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save billerickson/be599a090be6d08ea0ad to your computer and use it in GitHub Desktop.
Save billerickson/be599a090be6d08ea0ad to your computer and use it in GitHub Desktop.
<?php
/**
* Create Portfolio Album Template
*
*/
function be_portfolio_album_template( $template ) {
global $post;
if( is_singular( 'portfolio' ) && 0 == $post->post_parent )
$template = get_query_template( 'portfolio-album' );
return $template;
}
add_filter( 'template_include', 'be_portfolio_album_template' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment