Skip to content

Instantly share code, notes, and snippets.

@aslamhindko
Last active July 11, 2016 15:06
Show Gist options
  • Save aslamhindko/feea9d95e37c4478ebe90eb93d79f486 to your computer and use it in GitHub Desktop.
Save aslamhindko/feea9d95e37c4478ebe90eb93d79f486 to your computer and use it in GitHub Desktop.
(blog post k singal.php ka loop hain)
<div class="margin100"></div>
<div class="container">
<div class="row">
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-md-8 col-sm-8">
<article class="posting">
<?php
if(has_post_thumbnail()){
$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(),'full', true);
?>
<?php $pic = $thumbnail[0]; ?>
<?php }else{ ?>
<?php $pic = "".site_url()."/wp-content/uploads/2016/02/service3.png"; ?>
<?php } ?>
<h2><?php the_title(); ?></h2>
<span><?php echo get_the_date( ); ?></span>
<img class="img-responsive center-block" src="<?php echo $pic; ?>">
<p><?php the_content(); ?></p>
</article>
</div>
<?php endwhile; ?>
<div class="col-md-4 col-sm-4">
<section class="relatedpost">
<?php dynamic_sidebar('sidebar-1' ); ?>
</section>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment