'; if (is_archive()) { if (have_posts()) { //init $count = $theCatID = ''; // set to empty $count = $theCatID = ''; if (is_category()) { $theCatID = get_term_by('slug', $wp_query->query_vars['category_name'], 'category'); if (!empty($theCatID)) $theCatID = $theCatID->term_id; if (isset($wp_query->query_vars['cat'])) $theCatID = (int)$wp_query->query_vars['cat']; } $count = $wp_query->found_posts; if (empty($count)) $count = 'No'; //Setup page title $title_string = ''; if ($count > 0) { if (is_category()) { /* Category */ $title_string = __('Category Archives:', 'sunny-and-blue') . ' ' . single_cat_title('', false); } elseif (is_tag()) { /* Tag */ $title_string = __('Tagged Posts:', 'sunny-and-blue') . ' ' . single_tag_title('', false); } elseif (is_day()) { $title_string = __('Daily Archives:', 'sunny-and-blue') . ' ' . get_the_time('F jS, Y'); } elseif (is_month()) { $title_string = __('Monthly Archives:', 'sunny-and-blue') . ' ' . get_the_time('F, Y'); } elseif (is_year()) { $title_string = __('Yearly Archives:', 'sunny-and-blue') . ' ' . get_the_time('Y'); } elseif (is_author()) { $title_string = __('Author Archives:', 'sunny-and-blue') . ' ' . '' . get_the_author() . ''; /* Since we called the_post() rewind the loop back to the beginning */ rewind_posts(); } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { $title_string = __('Archives', 'sunny-and-blue'); } elseif (isset($wp_query->query_vars['taxonomy']) && taxonomy_exists($wp_query->query_vars['taxonomy'])) { $taxonomy_name = ''; if (isset($wp_query->query_vars['chapters'])) { $taxonomy_name = get_term_by('slug', $wp_query->query_vars['chapters'], 'chapters'); if (!is_wp_error($taxonomy_name) && !empty($taxonomy_name)) $title_string = $taxonomy_name->name; } elseif (isset($wp_query->query_vars['locations'])) { $taxonomy_name = get_term_by('slug', $wp_query->query_vars['locations'], 'locations'); if (!is_wp_error($taxonomy_name) && !empty($taxonomy_name)) $title_string = $taxonomy_name->name; } elseif (term_exists($wp_query->query_vars['term'])) { $title_string = __('Archive for', 'sunny-and-blue') . ' ' . $wp_query->query_vars['term']; } else { $title_string = __('Archive for', 'sunny-and-blue') . ' ' . $wp_query->query_vars['taxonomy']; } } elseif ($wp_query->query_vars['post_type'] !== 'post') { $title_string = __('Archive for', 'sunny-and-blue') . ' ' . $wp_query->query_vars['post_type']; } else { $title_string = __('No Archive Found.', 'sunny-and-blue'); } } else $title_string = __('No Archive Found.', 'sunny-and-blue'); //End setup page title ?>

query_vars['chapters']) || ($wp_query->query_vars['post_type'] == 'comic')) { ?>
'; echo the_title(); echo ''; echo ""; echo '
'; echo "By "; the_author_posts_link(); echo " on "; the_date(get_option('date_format')); echo " at "; the_time(get_option('time_format')); echo '
'; //If it's a comic if ($post->post_type == 'comic') { echo do_action('comic-post-info'); get_the_post_thumbnail(); if (has_post_thumbnail()) { // check if the post has a Post Thumbnail assigned to it. echo ''; the_post_thumbnail('medium'); echo '
'; } //Display sharing only for comic, regular blog content has sharing already built in. if (function_exists('sharing_display')) { $switched_status = get_post_meta($post->ID, 'sharing_disabled', false); if (empty($switched_status)) echo sharing_display(); } } // else regular blog post else { the_excerpt(); } the_tags('Tags: ', ', ', '
'); endwhile; ?>

Archive