Skip to content

Instantly share code, notes, and snippets.

@richtabor
Created September 8, 2014 11:00
Show Gist options
  • Save richtabor/3a5e33ebe09619bc7c9e to your computer and use it in GitHub Desktop.
Save richtabor/3a5e33ebe09619bc7c9e to your computer and use it in GitHub Desktop.
Add this to archive-portfolio.php, on line 24
<?php if ( is_post_type_archive('portfolio') OR is_tax() ) { ?>
<div class="block portfolio-archive">
<h1 class="entry-title">
<?php
if ( is_post_type_archive('portfolio') ) {
post_type_archive_title();
} elseif ( get_the_terms($post->ID, 'portfolio_tag') ) {
printf( __( '%s', 'bean' ), single_tag_title( '', false ) . '' );
} elseif (get_the_terms($post->ID, 'portfolio_category')) {
printf( __( '', 'bean' )); single_cat_title();
} else {
printf( __( 'Archives', 'bean' ) );
} ?>
</h1>
<?php if ( category_description() ) { ?>
<p><?php echo category_description(); ?></p>
<?php } ?>
</div><!-- END.block -->
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment