Code Duplication    Length = 26-29 lines in 2 locations

archive.php 1 location

@@ 15-43 (lines=29) @@
12
	<div id="primary" class="content-area">
13
		<main id="main" class="site-main" role="main">
14
		<?php
15
		if ( have_posts() ) : ?>
16
17
			<header class="page-header">
18
				<?php
19
					the_archive_title( '<h1 class="page-title">', '</h1>' );
20
					the_archive_description( '<div class="taxonomy-description">', '</div>' );
21
				?>
22
			</header><!-- .page-header -->
23
24
			<?php
25
			/* Start the Loop */
26
			while ( have_posts() ) : the_post();
27
28
				/*
29
				 * Include the Post-Format-specific template for the content.
30
				 * If you want to override this in a child theme, then include a file
31
				 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
32
				 */
33
				get_template_part( 'template-parts/content', get_post_format() );
34
35
			endwhile;
36
37
			the_posts_navigation();
38
39
		else :
40
41
			get_template_part( 'template-parts/content', 'none' );
42
43
		endif; ?>
44
45
		</main><!-- #main -->
46
	</div><!-- #primary -->

search.php 1 location

@@ 16-41 (lines=26) @@
13
		<main id="main" class="site-main" role="main">
14
15
		<?php
16
		if ( have_posts() ) : ?>
17
18
			<header class="page-header">
19
				<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'lighthouse' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
20
			</header><!-- .page-header -->
21
22
			<?php
23
			/* Start the Loop */
24
			while ( have_posts() ) : the_post();
25
26
				/**
27
				 * Run the loop for the search to output the results.
28
				 * If you want to overload this in a child theme then include a file
29
				 * called content-search.php and that will be used instead.
30
				 */
31
				get_template_part( 'template-parts/content', 'search' );
32
33
			endwhile;
34
35
			the_posts_navigation();
36
37
		else :
38
39
			get_template_part( 'template-parts/content', 'none' );
40
41
		endif; ?>
42
43
		</main><!-- #main -->
44
	</section><!-- #primary -->