<header class="entry-header">
		<h1 class="leader"><?php 
$post_type = get_post_type_object(get_post_type($post));
echo $post_type->labels->name;
?>
</h1>
        <?php 
edit_post_link(__('Edit', 'foghorn'), '<span class="edit-link">', '</span>');
?>

	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php 
get_content_for_tax_archive('library');
?>

		<h2>Topics</h2>
		<?php 
get_custom_taxonomy_list('library-categories');
?>

		<?php 
//The custom taxonomy that will be queried
$taxonomy = 'library-categories';
$custom_post_type = 'library';
$custom_terms = get_terms($taxonomy);
foreach ($custom_terms as $custom_term) {
    wp_reset_query();
    $args = array('post_type' => $custom_post_type, 'tax_query' => array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $custom_term->slug)));
	
	<header class="entry-header">
		<h1 class="leader"><?php 
$post_type = get_post_type_object(get_post_type($post));
echo $post_type->labels->name;
?>
</h1>
        <?php 
edit_post_link(__('Edit', 'foghorn'), '<span class="edit-link">', '</span>');
?>

	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php 
get_content_for_tax_archive('resources');
?>

		<h2>Topics</h2>
		<?php 
get_custom_taxonomy_list('resource-categories');
?>

		<?php 
//The custom taxonomy that will be queried
$taxonomy = 'resource-categories';
$custom_post_type = 'resources';
$custom_terms = get_terms($taxonomy);
foreach ($custom_terms as $custom_term) {
    wp_reset_query();
    $args = array('post_type' => $custom_post_type, 'tax_query' => array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $custom_term->slug)));