dreamslikefire
Member
Posted 2 years ago #
I am trying to pull 3 posts from specific category (7) with thumbnail from custom value (Custom field is "Featured Thumbnail" and value is image path) and also have a "Read More" button for each. Can anyone help me out? I would think this would be some pretty quick and easy code.
<?php
query_posts('cat=7&posts_per_page=3');
if(have_posts()) :
while(have_posts()) :
the_post();
?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2><?php permalink(); ?></h2>
<div class="entry">
<?php
$img = get_post_meta($post->ID, 'Featured Thumbnail', true);
?><img src="<?php echo $img; ?>"/><?php
the_content('Read More');
?>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
dreamslikefire
Member
Posted 2 years ago #