Code Duplication    Length = 15-16 lines in 3 locations

archive.php 1 location

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

index.php 1 location

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

single.php 1 location

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