Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $wp_query;
- $posts = get_posts(array('post_type' => 'fiftyoffifty'));
- foreach($posts as $post) {
- setup_postdata($post); ?>
- <article class="grid8">
- <a href="<?php the_permalink() ?>">
- <?php if ( has_post_thumbnail() ) { ?>
- <?php the_post_thumbnail( 'medium-post-thumbnail' ); ?>
- <? } else { ?>
- <p>No Post Image!</p>
- <? } ?>
- <h3><?php the_title(); ?></h3>
- <?php $photonumber = get_post_meta(get_the_ID(), 'photo-number', true);?>
- <h4><span>Photo Number</span> <em><?= str_pad($photonumber, 2, "0", STR_PAD_LEFT); ?></em></h4>
- </a>
- </article>
- <?php } ?>
Add Comment
Please, Sign In to add comment