Last active
December 11, 2015 13:49
-
-
Save ahaywood/4610477 to your computer and use it in GitHub Desktop.
PHP: WP - Generic Loop
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
// WORDPRESS LOOP | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<div <?php post_class() ?> id="post-<?php the_ID(); ?>"> | |
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> | |
<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?> | |
<div class="entry"> | |
<?php the_content(); ?> | |
</div> | |
<div class="postmetadata"> | |
<?php the_tags('Tags: ', ', ', '<br />'); ?> | |
Posted in <?php the_category(', ') ?> | | |
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?> | |
<?php else : ?> | |
<h2>Not Found</h2> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment