Completed
Push — dev ( db2001...df383e )
by Eric
01:31
created

archive.php (4 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * The template for displaying archive pages.
4
 *
5
 * @link https://codex.wordpress.org/Template_Hierarchy
6
 *
7
 * @package bitsy
8
 */
9
10 View Code Duplication
if ( have_posts() ) : ?>
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Please always use braces to surround the code block of IF statements.
Loading history...
11
12
	<header class="page-header">
13
		<?php
14
			the_archive_title( '<h1 class="page-title">', '</h1>' );
15
			the_archive_description( '<div class="archive-description">', '</div>' );
16
		?>
17
	</header><!-- .page-header -->
18
19
	<?php
20
	/* Start the Loop */
21
	while ( have_posts() ) : the_post();
0 ignored issues
show
Please always use braces to surround the code block of WHILE statements.
Loading history...
22
23
		/*
24
		 * Include the Post-Format-specific template for the content.
25
		 * If you want to override this in a child theme, then include a file
26
		 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
27
		 */
28
		get_template_part( 'components/post/content', get_post_format() );
29
30
	endwhile;
31
32
	the_posts_navigation();
33
34
else :
0 ignored issues
show
Please always use braces to surround the code block of ELSE statements.
Loading history...
35
36
	get_template_part( 'components/post/content', 'none' );
37
38
endif;