archive title cleanup, adding custom taxonomy title
This commit is contained in:
27
archive.php
27
archive.php
@@ -5,21 +5,24 @@
|
|||||||
<div id="main" class="<?php echo $roots_options['main_class']; ?>" role="main">
|
<div id="main" class="<?php echo $roots_options['main_class']; ?>" role="main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
<?php if (is_day()) : ?>
|
<?php
|
||||||
<?php printf(__('Daily Archives: %s', 'roots'), get_the_date()); ?>
|
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
|
||||||
<?php elseif (is_month()) : ?>
|
if ($term) {
|
||||||
<?php printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y')); ?>
|
echo $term->name;
|
||||||
<?php elseif (is_year()) : ?>
|
} elseif (is_day()) {
|
||||||
<?php printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); ?>
|
printf(__('Daily Archives: %s', 'roots'), get_the_date());
|
||||||
<?php elseif (is_author()) : ?>
|
} elseif (is_month()) {
|
||||||
<?php
|
printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y'));
|
||||||
|
} elseif (is_year()) {
|
||||||
|
printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y'));
|
||||||
|
} elseif (is_author()) {
|
||||||
global $post;
|
global $post;
|
||||||
$author_id = $post->post_author;
|
$author_id = $post->post_author;
|
||||||
printf(__('Author Archives: %s', 'roots'), get_the_author_meta('user_nicename', $author_id));
|
printf(__('Author Archives: %s', 'roots'), get_the_author_meta('user_nicename', $author_id));
|
||||||
?>
|
} else {
|
||||||
<?php else : ?>
|
single_cat_title();
|
||||||
<?php single_cat_title(); ?>
|
}
|
||||||
<?php endif; ?>
|
?>
|
||||||
</h1>
|
</h1>
|
||||||
<?php roots_loop_before(); ?>
|
<?php roots_loop_before(); ?>
|
||||||
<?php get_template_part('loop', 'category'); ?>
|
<?php get_template_part('loop', 'category'); ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user