Created
December 20, 2014 23:57
-
-
Save sunilw/b054f0851fc5a58c24f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Template Name: Direct Actions | |
*/ | |
get_header(); ?> | |
<div id="content"> | |
<header class="section-header"> | |
<h2>Direct Actions</h2> | |
</header> | |
<div id="Posts" class="loop"> | |
<?php | |
$args = array( | |
'posts_per_page' => 2, | |
'category_name' => 'direct-actions' | |
) ; | |
$my_query = new WP_Query($args) ; | |
if ($my_query->have_posts()) : ?> | |
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<div class="post-wrapper"> | |
<small class="date"><?php the_time('F jS, Y') ?></small> | |
<div <?php post_class() ?>> | |
<div class="title"> | |
<h2> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> | |
<span><?php the_title(); ?><span> | |
</a> | |
</h2> | |
</div> | |
<div class="excerpt"> | |
<p><?php the_excerpt(); ?></p> | |
</div> | |
<div class="post-footer"> | |
<a class="more-link" href="<?php the_permalink(); ?>" | |
alt="<?php the_title_attribute(); ?>">Read more</a> | |
</div> | |
</div> | |
</div> <!-- ENDS .post-wrapper --> | |
<?php endwhile; ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment