• Resolved dreamslikefire

    (@dreamslikefire)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?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();
    ?>
    Thread Starter dreamslikefire

    (@dreamslikefire)

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pull 3 posts from specific category with thumbnail from custom field’ is closed to new replies.