custom fields
-
I was wondering what would be the best way to complete this..
I have a thumbnail custom field on every post, and they display in a div perfectly. However, the number of posts is going up so I want to only have 12 thumbnails in one div, and a link at the bottom showing another div with another 12 thumbnails and so on, with next and previous links included.
The code so far for my custom fields are ..
<div id="thumbnailsbox" class="thumbnails" style="display:block;padding:0;margin:0;"> <?php foreach($lastposts as $post) : setup_postdata($post);?> <?php $imgThumb = get_post_meta($post->ID,'img_thumb', true); ?> <?php if($imgThumb !=""){ ?> <a>" title="<?php the_title(); ?>"><?php echo "<img class='thumb' src='$imgThumb'/>" ?></a> <?php } else { echo ''; } ?> <?php endforeach; ?> <?php endwhile; else: ?> <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?> </div> <!-- close thumbnails-->I’ve been struggling with this for a while, and I’d really like to nail this, so any help would be awesome!
xo
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘custom fields’ is closed to new replies.