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 single posts. |
||
4 | * |
||
5 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post |
||
6 | * |
||
7 | * @package Lighthouse |
||
8 | */ |
||
9 | |||
10 | get_header(); ?> |
||
11 | |||
12 | <?php |
||
13 | //get the blog info |
||
14 | $blog_url = get_permalink( get_option('page_for_posts' ) ); |
||
15 | $blog_title = get_the_title( get_option('page_for_posts' ) ); |
||
16 | ?> |
||
17 | <div class="title-wrapper"> |
||
18 | <div class="container blog-wrapper"> |
||
19 | <div class="row"> |
||
20 | <div class="col-xs-12"> |
||
21 | <h1 class="entry-title"><?php echo $blog_title;?></h1> <div class="back-to"> <span> | </span><a href="<?php echo $blog_url;?>">back</a></div> |
||
22 | </div> |
||
23 | </div> |
||
24 | </div> |
||
25 | </div> |
||
26 | <div id="primary" class="container content-area blog-wrapper"> |
||
27 | <div class="row"> |
||
28 | <div class="col-md-9 blog-listing"> |
||
29 | <main id="main" class="site-main" role="main"> |
||
30 | |||
31 | <?php |
||
32 | while ( have_posts() ) : the_post(); |
||
33 | |||
34 | $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); |
||
35 | $url = $thumb[0]; |
||
36 | ?> |
||
37 | |||
38 | <div class="post-img"> |
||
39 | <img class="img-responsive" src="<?php echo $url; ?>"> |
||
40 | </div> |
||
41 | |||
42 | <?php |
||
43 | get_template_part( 'template-parts/content', get_post_format() ); |
||
44 | |||
45 | //the_post_navigation(); |
||
46 | |||
47 | // If comments are open or we have at least one comment, load up the comment template. |
||
48 | // if ( comments_open() || get_comments_number() ) : |
||
0 ignored issues
–
show
|
|||
49 | // comments_template(); |
||
50 | // endif; |
||
51 | |||
52 | endwhile; // End of the loop. |
||
53 | ?> |
||
54 | |||
55 | </main><!-- #main --> |
||
56 | </div> |
||
57 | <div class="col-md-3 sidebar" role="complementary"> |
||
58 | <?php dynamic_sidebar( 'blog_widgets' ); ?> |
||
59 | </div> |
||
60 | </div><!-- .row --> |
||
61 | </div><!-- #primary --> |
||
62 | |||
63 | <?php |
||
64 | get_sidebar(); |
||
65 | get_footer(); |
||
66 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.