if (have_posts()) {
    /* Queue the first post, that way we know
     * what author we're dealing with (if that is the case).
     *
     * We reset this later so we can run the loop
     * properly with a call to rewind_posts().
     */
    the_post();
    $msg = apply_filters('weaverx_author_archives', __('Author Archives: %s', 'weaver-xtreme'));
    $title = '<span class="author-title-label">' . sprintf($msg, '</span><span class="vcard archive-info"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta("ID"))) . '" title="' . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a></span>');
    ?>


		<header class="page-header archive-title">
			<?php 
    weaverx_archive_title($title, 'author', ' author');
    ?>
		</header>

		<?php 
    /* Since we called the_post() above, we need to
     * rewind the loop back to the beginning that way
     * we can run the loop properly, in full.
     */
    rewind_posts();
    weaverx_content_nav('nav-above');
    weaverx_author_info();
    /* The Loop */
    weaverx_archive_loop('author');
    weaverx_content_nav('nav-below');
} else {
// Exit if accessed directly
/**
 *  Specific page output template
 */
/*! ** DO NOT EDIT THIS FILE! It will be overwritten when the theme is updated! ** */
$sb_layout = weaverx_page_lead('search', true);
// and next the content area.
weaverx_sb_precontent('search');
if (have_posts()) {
    $msg = apply_filters('weaverx_search_results', __('Search Results for: %s', 'weaver-xtreme'));
    $title = '<span class="title-search-label">' . sprintf($msg, '</span><span class="archive-info">' . '"' . get_search_query() . '"</span>');
    ?>

	<header class="page-header">
		<?php 
    weaverx_archive_title($title, 'search');
    ?>
	</header>

		<?php 
    weaverx_content_nav('nav-above', true);
    /* Start the Loop */
    weaverx_post_count_clear();
    weaverx_masonry('begin-posts');
    while (have_posts()) {
        the_post();
        weaverx_post_count_bump();
        /* Include the Post-Format-specific template for the content.
         * If you want to overload this in a child theme then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
// Exit if accessed directly
/**
 *  Tag page output template
 */
/*! ** DO NOT EDIT THIS FILE! It will be overwritten when the theme is updated! ** */
$sb_layout = weaverx_page_lead('tag', true);
// and next the content area.
weaverx_sb_precontent('tag');
if (have_posts()) {
    ?>

	<header class="page-header">
		<?php 
    $tt = apply_filters('weaverx_tag_archives', __('Tag Archives: %s', 'weaver-xtreme'));
    $title = '<span class="title-tag-label">' . sprintf($tt, '</span><span class="archive-info">' . single_tag_title('', false) . '</span>');
    weaverx_archive_title($title, 'tag');
    $tag_description = tag_description();
    if (!empty($tag_description)) {
        echo apply_filters('tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>');
    }
    ?>
	</header>

	<?php 
    weaverx_content_nav('nav-above');
    /* The Loop */
    weaverx_archive_loop('tag');
    weaverx_content_nav('nav-below');
} else {
    weaverx_not_found_search(__FILE__);
}
                $archive = '<span class="title-archive-label">' . sprintf($msg, '</span><span class="archive-info">' . get_the_date('Y')) . '</span>';
            } else {
                if (is_tax()) {
                    // these improve presentation of custom tax titles
                    $archive = single_term_title('', false);
                } else {
                    $archive = post_type_archive_title('', false);
                }
            }
        }
    }
    ?>

					<header class="page-header">
						<?php 
    weaverx_archive_title($archive, 'archive');
    $term_description = term_description();
    if (!empty($term_description)) {
        echo apply_filters('taxonomy_archive_meta', '<div class="tax-archive-meta">' . $term_description . '</div>');
    }
    ?>
					</header>
					<?php 
    weaverx_content_nav('nav-above');
    /* The Loop */
    weaverx_archive_loop('archive');
    weaverx_content_nav('nav-below');
} else {
    weaverx_not_found_search(__FILE__);
}
weaverx_sb_postcontent('archive');
// Exit if accessed directly
/**
 *  Category page template
 */
/*! ** DO NOT EDIT THIS FILE! It will be overwritten when the theme is updated! ** */
$sb_layout = weaverx_page_lead('category', true);
// and next the content area.
weaverx_sb_precontent('category');
if (have_posts()) {
    $msg = apply_filters('weaverx_category_archives', __('Category Archives: %s', 'weaver-xtreme'));
    $title = '<span class="category-title-label">' . sprintf($msg, '</span><span class="archive-info">' . single_cat_title('', false) . '</span>');
    ?>

				<header class="page-header">
					<?php 
    weaverx_archive_title($title, 'category');
    $category_description = category_description();
    if (!empty($category_description)) {
        echo apply_filters('category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>');
    }
    ?>
				</header>

				<?php 
    weaverx_content_nav('nav-above');
    /* The Loop */
    weaverx_archive_loop('category');
    weaverx_content_nav('nav-below');
} else {
    weaverx_not_found_search(__FILE__);
}