Blog Index page
Blog index page with sharing buttons (using Font awesome. Will need to change social links)
<?php /** Template Name: Blog Index */ get_header(); ?><div class="product-big-title-area"> <div class="container" style="margin-bottom:10px;"> <div class="row"> <div class="col-md-12"> <div class="product-bit-title text-center"> <h1>Blog</h1> </div> </div> </div> </div> </div> <div class="container entry-content"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => 3, 'paged' => $paged ); query_posts($args); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="row"><div class="col-md-12"> <div> <h2><?php the_title(); ?></h2> <?php the_time('jS F Y') ?><br /> <a alt="Twitter @Platform7Teen" class="twitter-icon" href="http://twitter.com/share?text=<?php echo urlencode(the_title()); ?>&url=<?php echo urlencode(the_permalink()); ?>&via=Platform7Teen" title="Share on Twitter" rel="nofollow" target="_blank"><i class="fa fa-twitter-square fa-2x"></i></a> <a alt="Facebook Platform7Teen" class="facebook-icon" target="_blank" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>"><i class="fa fa-facebook-square fa-2x"></i></a> <a class="linkedin-icon" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title(); ?>&summary=<?php echo get_the_excerpt(); ?>&source=Platform7Teen" target="_blank"><i class="fa fa-linkedin-square fa-2x"></i></a> <a class="googleplus-icon" href="https://plus.google.com/share?url=<?php the_permalink();?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank"><i class="fa fa-google-plus-square fa-2x"></i></a> <hr /> <?php the_excerpt(); ?> <h6><a href="<?php the_permalink() ?>">Read More</a></h6> </div> </div></div> <?php endwhile; ?> <?php endif; ?> <!--Pagination--> </div> <?php get_footer(); ?>