Last active
August 16, 2016 06:12
-
-
Save mzo84/df779138193b604a0b353ef0a6411439 to your computer and use it in GitHub Desktop.
wordpress 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
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<div class="post" id="post-<?php the_ID(); ?>"> | |
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> | |
<?php echo get_post_meta($post->ID, 'PostThumb', true); ?> | |
<p class="meta"> | |
<span>Posted on</span> <?php the_time('F jS, Y'); ?> <span>by</span> <?php the_author(); ?> | |
</p> | |
<?php the_content('Read Full Article'); ?> | |
<p><?php the_tags('Tags: ', ', ', '<br />'); ?> | |
Posted in <?php the_category(', '); ?> | |
<?php comments_popup_link('No Comments;', '1 Comment', '% Comments'); ?></p> | |
</div> | |
<?php endwhile; ?> | |
<?php next_posts_link('Older Entries'); ?> | |
<?php previous_posts_link('Newer Entries'); ?> | |
<?php else : ?> | |
<h2>Nothing Found</h2> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment