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 | * @package lsx |
||
6 | */ |
||
7 | |||
8 | get_header(); ?> |
||
9 | |||
10 | <?php lsx_content_wrap_before(); ?> |
||
11 | |||
12 | <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
||
13 | |||
14 | <?php lsx_content_before(); ?> |
||
15 | |||
16 | <main id="main" class="site-main" role="main"> |
||
17 | |||
18 | <?php lsx_content_top(); ?> |
||
19 | |||
20 | View Code Duplication | <?php if ( have_posts() ) : ?> |
|
0 ignored issues
–
show
|
|||
21 | |||
22 | <?php |
||
23 | while ( have_posts() ) : |
||
24 | the_post(); |
||
25 | ?> |
||
26 | |||
27 | <?php get_template_part( 'partials/content', 'page' ); ?> |
||
28 | |||
29 | <?php endwhile; ?> |
||
30 | |||
31 | <?php endif; ?> |
||
32 | |||
33 | <?php lsx_content_bottom(); ?> |
||
34 | |||
35 | </main><!-- #main --> |
||
36 | |||
37 | <?php lsx_content_after(); ?> |
||
38 | |||
39 | <?php |
||
40 | if ( comments_open() ) { |
||
41 | comments_template(); |
||
42 | } |
||
43 | ?> |
||
44 | |||
45 | </div><!-- #primary --> |
||
46 | |||
47 | <?php lsx_content_wrap_after(); ?> |
||
48 | |||
49 | <?php get_sidebar(); ?> |
||
50 | |||
51 | <?php |
||
52 | get_footer(); |
||
53 |
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.