Created
October 6, 2015 08:02
-
-
Save temazinkin/2179dc310840b0941db3 to your computer and use it in GitHub Desktop.
main loop wordpress
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
<!-- Start the Loop. --> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<div class="post"> | |
<h2> | |
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> | |
<?php the_title(); ?> | |
</a> | |
</h2> | |
<small> | |
<?php the_time('F jS, Y'); ?> by <?php the_author_posts_link(); ?> | |
</small> | |
<div class="entry"> | |
<?php the_content(); ?> | |
</div> | |
<p class="postmetadata"> | |
<?php _e( 'Posted in' ); ?> <?php the_category( ', ' ); ?> | |
</p> | |
</div> | |
<?php endwhile; else : ?> | |
<p> | |
<?php _e( 'Sorry, no posts matched your criteria.' ); ?> | |
</p> | |
<?php endif; ?> | |
<!-- Stop The Loop. --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment