Make WordPress Themes

source: twentyfourteen/4.3/tag.php

Last change on this file was 151902, checked in by themedropbox, 4 years ago

New version of Twenty Fourteen - 3.2

File size: 1.6 KB
Line 
1<?php
2/**
3 * The template for displaying Tag pages
4 *
5 * Used to display archive-type pages for posts in a tag.
6 *
7 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
8 *
9 * @package WordPress
10 * @subpackage Twenty_Fourteen
11 * @since Twenty Fourteen 1.0
12 */
13
14get_header(); ?>
15
16        <section id="primary" class="content-area">
17                <div id="content" class="site-content" role="main">
18
19                        <?php if ( have_posts() ) : ?>
20
21                        <header class="archive-header">
22                                <h1 class="archive-title">
23                                <?php
24                                /* translators: %s: Tag title. */
25                                printf( __( 'Tag Archives: %s', 'twentyfourteen' ), single_tag_title( '', false ) );
26                                ?>
27                                </h1>
28
29                                <?php
30                                        // Show an optional term description.
31                                        $term_description = term_description();
32                                if ( ! empty( $term_description ) ) :
33                                        printf( '<div class="taxonomy-description">%s</div>', $term_description );
34                                        endif;
35                                ?>
36                        </header><!-- .archive-header -->
37
38                                <?php
39                                // Start the Loop.
40                                while ( have_posts() ) :
41                                        the_post();
42
43                                        /*
44                                         * Include the post format-specific template for the content. If you want
45                                         * to use this in a child theme, then include a file called content-___.php
46                                         * (where ___ is the post format) and that will be used instead.
47                                         */
48                                        get_template_part( 'content', get_post_format() );
49
50                                        endwhile;
51                                        // Previous/next page navigation.
52                                        twentyfourteen_paging_nav();
53
54                                else :
55                                        // If no content, include the "No posts found" template.
56                                        get_template_part( 'content', 'none' );
57
58                                endif;
59                                ?>
60                </div><!-- #content -->
61        </section><!-- #primary -->
62
63<?php
64get_sidebar( 'content' );
65get_sidebar();
66get_footer();
Note: See TracBrowser for help on using the repository browser.