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 all pages |
||
4 | * |
||
5 | * This is the template that displays all pages by default. |
||
6 | * Please note that this is the WordPress construct of pages |
||
7 | * and that other 'pages' on your WordPress site will use a |
||
8 | * different template. |
||
9 | * |
||
10 | * @link https://codex.wordpress.org/Template_Hierarchy |
||
11 | * |
||
12 | * @package Strip |
||
13 | */ |
||
14 | |||
15 | get_header(); ?> |
||
16 | |||
17 | <div id="primary" class="content-area"> |
||
18 | <div id="content" class="site-content" role="main"> |
||
19 | |||
20 | View Code Duplication | <?php while ( have_posts() ) : |
|
0 ignored issues
–
show
|
|||
21 | the_post(); ?> |
||
22 | |||
23 | <?php get_template_part( 'content', 'page' ); ?> |
||
24 | |||
25 | <?php |
||
26 | // If comments are open or we have at least one comment, load up the comment template. |
||
27 | if ( comments_open() || '0' !== get_comments_number() ) { |
||
28 | comments_template(); |
||
29 | } |
||
30 | ?> |
||
31 | |||
32 | <?php endwhile; // end of the loop. ?> |
||
33 | |||
34 | </div><!-- #content --> |
||
35 | </div><!-- #primary --> |
||
36 | |||
37 | <?php get_footer(); ?> |
||
38 |
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.