Completed
Push — master ( acfc89...556f73 )
by Md. Mozahidur
03:17 queued 10s
created

single.php (1 issue)

Upgrade to new PHP Analysis Engine

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
	<div class="title-wrapper">
13
		<div class="container blog-wrapper">
14
			<div class="row">
15
			<div class="col-xs-12">
16
				<h1 class="entry-title">Lighthouse News Centre</h1> <div class="back-to"> <span> | </span><a href="<?php echo get_site_url(); ?>/news-centre">back</a></div>
17
			</div>
18
			</div>
19
		</div>
20
	</div>
21
	<div id="primary" class="container content-area blog-wrapper">
22
		<div class="row">
23
			<div class="col-md-9 blog-listing">
24
				<main id="main" class="site-main" role="main">
25
26
				<?php
27
				while ( have_posts() ) : the_post();
28
29
					$thumb_feature = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_feature_img');
30
					$url_feature = $thumb_feature[0];
31
				?> 
32
33
				<div class="post-img">
34
				<img class="img-responsive" src="<?php echo $url_feature; ?>">
35
				</div>
36
37
				<?php
38
				get_template_part( 'template-parts/content', get_post_format() );
39
40
					//the_post_navigation();
41
42
					// If comments are open or we have at least one comment, load up the comment template.
43
					// if ( comments_open() || get_comments_number() ) :
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
44
					// 	comments_template();
45
					// endif;
46
47
				endwhile; // End of the loop.
48
				?>
49
50
				</main><!-- #main -->
51
52
				<div class="post-slider row">
53
						<h2>Related Artices</h2>
54
						<div id="related-posts" class="owl-carousel">
55
							<?php
56
							 $postslist = get_posts('numberposts=99&order=DESC&orderby=date');
57
							 foreach ($postslist as $post) :
58
							    setup_postdata($post);
59
							 ?>
60
							 <div class="col-xs-12">
61
							 <div class="entry">
62
63
								<div class="thumbnail thumbnail-hover">
64
								<?php
65
									$thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post');
66
									$url_post = $thumb_post[0];
67
								?>
68
									<img class="img-responsive" src="<?php echo $url_post; ?>">
69
									<a href="<?php the_permalink() ?>" title="<?php  the_title_attribute() ?>" class="overlay"></a>
70
								</div>
71
72
							 <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
73
								<span class="date">
74
								<i class="fa fa-clock-o"></i>
75
								<?php the_time(get_option('date_format')) ?>
76
								</span>
77
							 </div>
78
							 </div>
79
							 <?php endforeach; ?>
80
81
						</div>
82
				</div>
83
84
85
			</div>
86
		<div class="col-md-3 sidebar" role="complementary">
87
			<?php dynamic_sidebar( 'blog_widgets' ); ?>
88
		</div>
89
		</div><!-- .row -->
90
	</div><!-- #primary -->
91
92
<?php
93
get_sidebar();
94
get_footer();
95