Code Duplication    Length = 15-16 lines in 3 locations

archive.php 1 location

@@ 37-51 (lines=15) @@
34
                <?php /* Start the Loop */?>
35
                <?php
36
37
                while (have_posts()) {
38
                    the_post();
39
40
        /*
41
         * Include the Post-Format-specific template for the content.
42
         * If you want to override this in a child theme, then include a file
43
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
44
         */
45
        if (get_post_type() != 'post') {
46
            get_template_part('template-parts/content', get_post_type());
47
        } else {
48
            get_template_part('template-parts/content-post', get_post_format());
49
        }
50
51
    }
52
53
// End while
54

index.php 1 location

@@ 28-43 (lines=16) @@
25
26
/* Start the Loop */
27
28
    while (have_posts()) {
29
30
        the_post();
31
32
        /*
33
         * Include the Post-Format-specific template for the content.
34
         * If you want to override this in a child theme, then include a file
35
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
36
         */
37
        if (get_post_type() != 'post') {
38
            get_template_part('template-parts/content', get_post_type());
39
        } else {
40
            get_template_part('template-parts/content-post', get_post_format());
41
        }
42
43
    }
44
45
    if (function_exists('emm_paginate')) {
46

single.php 1 location

@@ 22-37 (lines=16) @@
19
20
      <?php
21
22
      while (have_posts()) {
23
24
        the_post();
25
26
        if (get_post_type() != 'post') {
27
            get_template_part('template-parts/content-single', get_post_type());
28
        } else {
29
            get_template_part('template-parts/content-single-post', get_post_format());
30
        }
31
32
        the_post_navigation();
33
34
        // If comments are open or we have at least one comment, load up the comment template.
35
        comments_template();
36
37
      }
38
39
// End of the loop. ?>
40