Created
April 27, 2016 01:27
-
-
Save anthonysbrown/ee0b8188313f91d00b5d3135ad34a443 to your computer and use it in GitHub Desktop.
This file contains 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 | |
// the query | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => 1, | |
); | |
$the_query = new WP_Query( $args ); ?> | |
<?php if ( $the_query->have_posts() ) : ?> | |
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<h2><?php the_title(); ?></h2> | |
<header> | |
<h2 class="title entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></h2></a></header> | |
<div class="post-meta"><abbr class="date time published updated" ><?php the_date(); ?></abbr></div> | |
<section class="entry"> | |
<?php the_content(); ?> | |
</section><!-- /.entry --> | |
<div class="fix"></div> | |
<div class="post-more"> | |
<span class="read-more"><a href="<?php the_permalink(); ?>" title="Continue Reading">Continue Reading</a></span> </div> | |
<?php endwhile; ?> | |
<?php wp_reset_postdata(); ?> | |
<?php else : ?> | |
<p><?php _e( 'Sorry, no posts.' ); ?></p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment